1827 Commits

Author SHA1 Message Date
Christian Robertson
4b65f0ebee Tunings for touch ripple animations
Added a log based interpolator (it's faster in the beginning and smoother
at the finish than the decelerate interpolator)

Scaled the timing and opacity of the falloff ripple based on the size
of the outer bounding radius. Backing circles aren't as apparent for
Smaller touch targets.

BUG: 15591274
2014-06-13 00:19:40 +00:00
Alan Viverette
a4eab42fe4 Change ripple tint to color, remove tintMode
Also fixes double ripple on list preferences, missing ripple on up
button, and adds the Toolbar style to public. Further improves
ripple performance.

BUG: 15523923
BUG: 15473856
Change-Id: I5e8bf417368b60fcc33c80852e12f27b8c580774
2014-06-10 11:00:25 -07:00
Alan Viverette
1b6e856e6f Optimize use of layers in ripple, update dialog styling
BUG: 15474733
BUG: 15473856
Change-Id: I7c17865c7b2d4aad0fc3660ffac90e9f7ce8fda9
2014-06-09 10:59:08 -07:00
Alan Viverette
1abd798db9 Merge "DO NOT MERGE Material theme" into lmp-preview-dev 2014-06-06 21:56:51 +00:00
Alan Viverette
3cb07a462b DO NOT MERGE Material theme
BUG: 15467097
Change-Id: I15191362e104a902895418fc615892c21db64c35
2014-06-06 14:19:53 -07:00
svetoslavganov
27d3e6d06f Current page not updated when closed
Change-Id: I19845f179f9e712f0213c845c795d5e2c9ea4e29
2014-06-06 20:59:51 +00:00
Alan Viverette
06318a0869 Update drawables to fix CTS test failures
Change-Id: I78617aedab450f5bc18807c03d07ee776584ece0
2014-06-06 10:59:55 -07:00
Alan Viverette
3b983a74c6 Fix default stroke width and NPE for line with no stroke width
Also fixes restart on visiblity change in AnimationDrawable

BUG: 15437284
Change-Id: I698e7ffb11489061a38fbcd5cea10ba11a6abb34
2014-06-05 13:43:25 -07:00
Alan Viverette
b996d809bf Update ripple spec, fix ripple mask, rotate progress drawable
Change-Id: I4fc155bf2f12d9f324c354dee81479f9cddafac4
2014-06-04 14:35:42 -07:00
Raph Levien
854363e3d2 Fix incorrect getStringBounds (Minikin)
This patch wires up getStringBounds to do the layout with Minikin to get
accurate bounds, and with the correct typeface. It fixes bug 15416575
"getStringBounds gives wrong result in Minikin".

Change-Id: I5c020bc372acb1d785a33c3c296239c151bd8c87
2014-06-03 21:11:06 -07:00
Raph Levien
38bd7b9c4d Merge "Better Minikin integration" into lmp-preview-dev 2014-06-04 00:46:25 +00:00
Raph Levien
f2114d5646 Better Minikin integration
This patch improves the Minikin integration in a number of ways,
including:

Software rendering does text decorations and handles alignment
correctly. This fixes bug 15139067 "Centered text isn't working".

Paint implements getTextPath. This fixes bug 15143354 "Text rendering in
Maps Navigation wrong typeface?"

Also a bit of refactoring, since there was duplicated code for iterating
font runs that's now a static method in MinikinUtils.

Change-Id: I4cfdb2c0559982376348325a757d95235fab1768
2014-06-03 17:44:35 -07:00
Alan Viverette
bb938107b7 Merge "Temporary drawable for Quantum progress indicator" into lmp-preview-dev 2014-06-04 00:00:14 +00:00
Alan Viverette
3567140b04 Temporary drawable for Quantum progress indicator
Also cleans up unused 20dp spinner drawables.

Change-Id: I69aba84eca9f9e8d44a4237d894015caeb3d2308
2014-06-03 16:02:26 -07:00
Alan Viverette
a48e7b5500 Merge "Fix build, fix Drawable loop" into lmp-preview-dev 2014-06-03 22:49:33 +00:00
Alan Viverette
55a54e17df Merge "Update theme colors, fix EditText state transition" into lmp-preview-dev 2014-06-03 22:49:33 +00:00
Alan Viverette
bd4d1c31f3 Merge "Set starting value on ripple exit animation" into lmp-preview-dev 2014-06-03 22:49:33 +00:00
Alan Viverette
910a0b4d02 Fix build, fix Drawable loop
Change-Id: I524b7f40c700ebe601fdbe80644a46e90ab2bba0
2014-06-03 15:48:30 -07:00
Alan Viverette
dcf7b59f84 Update theme colors, fix EditText state transition
BUG: 11218747
BUG: 15200201
Change-Id: I94368897ea9466ae971b25fc80d6ca43433aadd5
2014-06-03 14:43:38 -07:00
Alan Viverette
7a98f74438 Fix NPE when ripples are canceled due to visibility change
BUG: 15406248
Change-Id: I63ce42fef8e1614372ee4a82e45eb15e8bbe1fe3
2014-06-03 10:13:22 -07:00
Alan Viverette
840ff80962 Set starting value on ripple exit animation
Change-Id: I2eca91c02ea059591a2ee0c75c5355f0ecd5a4be
2014-06-02 18:01:38 -07:00
Alan Viverette
5a4af17e27 Merge "Clean up drawable theming APIs" into lmp-preview-dev 2014-06-02 23:41:59 +00:00
Alan Viverette
6dbe51b50e Clean up drawable theming APIs
Removes APIs for themed creation of a drawable from a stream, since
that doesn't involve any inflation. Also cleans up tinting methods
left over from previous clean up.

BUG: 15089957
Change-Id: I2af7aa9a6d351ae61b33ee1216c674fae1bffe11
Signed-off-by: Alan Viverette <alanv@google.com>
2014-06-02 16:39:04 -07:00
Raph Levien
596f0b1a03 Merge "Support fallbacks for custom typefaces (Minikin)" into lmp-preview-dev 2014-06-02 22:54:58 +00:00
Raph Levien
d573794d83 Support fallbacks for custom typefaces (Minikin)
This patch adds the fallback font list to custom typefaces created from
files and assets, as well as those created by name. This is a fix for
the deskclock half of bug 15139067 "Centered text isn't working".

Change-Id: I0cc60951953dfb73817a98ddfee5713f0387ee90
2014-06-02 10:56:23 -07:00
Alan Viverette
08847c8344 Merge "Fix null paint in GradientDrawable, make default values explicit" into lmp-preview-dev 2014-06-02 17:36:50 +00:00
Alan Viverette
71b2fbde56 Fix null paint in GradientDrawable, make default values explicit
BUG: 15237001
Change-Id: I80844919b910163ed986257efb4b6f8fb62eaf6a
2014-06-01 18:03:09 -07:00
Alan Viverette
dc6046fca3 Allow ripple bounds to change during enter animation
BUG: 15315168
Change-Id: I7588be96648318473998cfd5deba678224f1db51
2014-06-01 16:48:31 -07:00
Alan Viverette
c6c967b68a Merge "Fix padding for GradientDrawable" into lmp-preview-dev 2014-06-01 23:23:51 +00:00
Alan Viverette
982c59a55f Fix padding for GradientDrawable
BUG: 15197745
Change-Id: Ibd1c20dd8ba8c7ffbf65031be4ca9813304d4d0f
2014-06-01 16:11:32 -07:00
Alan Viverette
4d2f2483f6 Fixes hotspot list transitions, update to use a single hotspot
Also updates background and button colors to match spec, removes
dependency on bouncycastle Arrays. Vastly simplifies ripple drawing.
Adds APIs for maximum ripple radius. Makes selectableItemBackground
bounded by default and adds an unbounded version and theme attribute.

BUG: 15315168
BUG: 15314684
BUG: 15314830
BUG: 15316768
BUG: 15333033
BUG: 15344050
Change-Id: Ib0619587ce78e43056b66571bae185e0f1613185
2014-06-01 15:58:04 -07:00
Raph Levien
f9e3d31127 Language and variant selection for Minikin
This is the frameworks/base side of what's needed to support language
selection (especially Han unification, but also compact/elegant
selection for scripts that require more vertical space).

This is part of the fix for bug 15179652 "Japanese font isn't shown on
LMP".

Change-Id: I8f0f3aa9a1915659f8d0b590cf1c56529356049a
2014-05-29 14:21:24 -07:00
Deepanshu Gupta
baef8c1ffe Layoutlib fixes for L [DO NOT MERGE]
This adds the new delegates that were missing. This starts the work on
changes related to Minikin Fonts.

There are some changes related to TypedArray that still need to be
fixed.

Change-Id: Ic2397b64aa3f1f48926e849b14689c47d9ee7f8c
(cherry picked from commit 7ca3612094270183243938e79337c84effea7ad0)
2014-05-27 18:01:34 -07:00
ztenghui
427a15a0f0 Merge "DO NOT MERGE: Hide the VectorDrawable" into lmp-preview-dev 2014-05-27 16:09:05 +00:00
Chris Craik
cd3a824548 Merge "DO NOT MERGE Inspect SkShader to determine hw shader." into lmp-preview-dev 2014-05-23 23:21:49 +00:00
ztenghui
72da163821 DO NOT MERGE: Hide the VectorDrawable
Change-Id: Ie65194c8ec54063f48a541ee0cc82bccc41f5353
2014-05-23 16:08:36 -07:00
Alan Viverette
d6405c1c75 Merge "Add support for setColorFilter in VectorDrawable" into lmp-preview-dev 2014-05-23 21:20:45 +00:00
Alan Viverette
d30241541c DO NOT MERGE Fix build.
Change-Id: I2e9f7f27c94b9f9240a5ca76952024055ff79878
2014-05-23 11:10:12 -07:00
Alan Viverette
fd6e411767 Add support for setColorFilter in VectorDrawable
Also cleans up inflation so that we can apply themes more easily.

Change-Id: I56decb29fe987286a38fc0aa96f95952cf67c120
2014-05-23 10:29:37 -07:00
Leon Scroggins III
0fa2bd699a DO NOT MERGE Inspect SkShader to determine hw shader.
cherry-pick of Iaa7189178bda1c55f96da044d2a9fa602ba36034

Instead of duplicating internal info about SkShader, inspect the
SkShader installed on the SkPaint.

core/java/android/view/GLES20Canvas.java:
Remove setupModifiers, nResetModifiers, and nSetupShader.

core/jni/android/graphics/Shader.cpp:
Remove calls to create/destroy the (previously) attached SkiaShader.

core/jni/android_view_GLES20Canvas.cpp:
Remove native code for setupShader and resetModifiers.

graphics/java/android/graphics/BitmapShader.java:
graphics/java/android/graphics/ComposeShader.java:
graphics/java/android/graphics/LinearGradient.java:
graphics/java/android/graphics/RadialGradient.java:
graphics/java/android/graphics/Shader.java:
graphics/java/android/graphics/SweepGradient.java:
Remove code keeping track of native SkiaShader.

libs/hwui/Caches.h:
Include Extensions.h.

libs/hwui/DeferredDisplayList.cpp:
Compare shaders on the paint, instead of on DrawModifiers.

libs/hwui/DisplayList.cpp:
libs/hwui/DisplayList.h:
Remove vector of SkiaShaders.

libs/hwui/DisplayListOp.h:
Access the SkShader on mPaint.
Remove SetupShaderOp and ResetShaderOp.

libs/hwui/DisplayListRenderer.cpp:
libs/hwui/DisplayListRenderer.h:
Remove resetShader, setupShader, refShader, and mShaderMap.

libs/hwui/FontRenderer.cpp:
Pass SkShader to setupDrawShader and setupDrawShaderUniforms.

libs/hwui/OpenGLRenderer.cpp:
libs/hwui/OpenGLRenderer.h:
Add LayerShader, a class inheriting from SkShader, to mimic the
behavior of SkiaLayerShader. Unlike SkiaLayerShader, it can be set on
the SkPaint so it can be inspected later.
Set a LayerShader instead of a SkiaLayerShader.
setupDrawShader and setupDrawShaderUniforms now inspect an SkShader
passed in.
Inspect SkShader instead of mDrawModifiers.mShader.
Remove resetShader and setupShader.
setupDrawColorUniforms now takes a boolean indicating whether there is
a shader.
Add an inline function for accessing the SkShader on an SkPaint.
In setupDrawBlending(Layer*, bool), do not check the shader (which will
never be set), but do check whether the color filter may change the
alpha (newly fixed behavior).
In setupDrawBlending(SkPaint, ...), check the SkShader and whether the
color filter affects alpha (the latter is new behavior).

libs/hwui/Renderer.h:
Remove pure virtual functions setupShader and resetShader.

libs/hwui/ResourceCache.cpp:
libs/hwui/ResourceCache.h:
Remove functions for refing/unrefing shaders.

libs/hwui/SkiaShader.cpp:
libs/hwui/SkiaShader.h:
Much of this code was redundant and has been removed.
Convert structs into class with nothing but static functions for
calling describe/setupProgram.

libs/hwui/TextureCache.cpp:
libs/hwui/TextureCache.h:
Use the SkPixelRef as the key to the bitmap Lru cache, since shader
inspection will provide a different SkBitmap pointer (though it will
hold the correct SkPixelRef with the correct generation ID).

tests/CanvasCompare/src/com/android/test/hwuicompare/DisplayModifier.java:
tests/CanvasCompare/src/com/android/test/hwuicompare/ResourceModifiers.java:
Update manual test to have more shaders: radial, sweep, compose,
invalid compose.

BUG:10650594
Change-Id: I2e7182b3fc28268e7ca82fac6780540b6b45365c
2014-05-23 11:50:38 -04:00
Alan Viverette
2356c5e69b Update switch, checkbox, radio button, button, and toggle button
Add optical inset support to BitmapDrawable with gravity. Fix optical
inset support in DrawableContainer. Fix visibility change support in
AnimatedStateListDrawable. Adds a whole bunch of missing drawable
support to CheckedTextView.

BUG: 15127013
BUG: 15126976
BUG: 15125529
BUG: 15025806
BUG: 14597955
BUG: 14594498
BUG: 15152746
Change-Id: Id2d99e10838d25b6f927ca1e49996c8da8e78ab1
2014-05-22 22:43:59 -07:00
Alan Viverette
e7772d313b Move setTint into Drawable, unhide getDirtyBounds on Drawable
BUG: 15089957
Change-Id: Ib622ba24b3f4bcf430e1d524895ac5cb104a232e
2014-05-21 23:50:03 -07:00
Alan Viverette
190dad4317 Merge "Style and asset cleanup" 2014-05-22 01:11:20 +00:00
Alan Viverette
0a1c6f021b Style and asset cleanup
Updates button drawable and colors, cleans up Quantum styles, updates
highlight attribute name and color, fixes popup backgrounds.

Also fixes GradientDrawable opacity check.

Change-Id: I75dd35e815a8a33ec9f0b16e881e774edfb8c092
2014-05-21 18:10:53 -07:00
Chris Craik
b8fe2fcd71 Merge "Define light position (using new lighting spec) in Java" 2014-05-22 00:18:21 +00:00
Alan Viverette
a22aa8806b Merge "Clean up hotspot bounds API" 2014-05-21 23:40:07 +00:00
Alan Viverette
7ec5b2e5a3 Merge "Clean up Gradient drawable theming & whitespace" 2014-05-21 23:34:17 +00:00
Alan Viverette
53a3ed7c46 Clean up hotspot bounds API
Change-Id: I7daf7e2d360d761f673aa69a0f925b8076ab19c6
2014-05-21 15:42:54 -07:00
Alan Viverette
17dafdc8d8 Clean up Gradient drawable theming & whitespace
Change-Id: I66c857a71e5b4beaee6a7e6c04959fbacee3cbe1
2014-05-21 15:32:03 -07:00
Chris Craik
797b95b26b Define light position (using new lighting spec) in Java
Also updates the relative shadow strengths.

Change-Id: I6cac7275d38df98aea9f0dda463cd7207102986a
2014-05-21 13:50:29 -07:00