diff options
author | Alan Viverette <alanv@google.com> | 2014-08-29 15:20:13 -0700 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2014-08-29 15:20:13 -0700 |
commit | 7ff48839b0149eba1ab46cfd1476854c2e664a81 (patch) | |
tree | 501da57c7c55e63f762aa433c1920ba62e28b2e5 /graphics | |
parent | 3e294e9921db619f5ef0adaf6124a78fd73911b2 (diff) | |
download | frameworks_base-7ff48839b0149eba1ab46cfd1476854c2e664a81.zip frameworks_base-7ff48839b0149eba1ab46cfd1476854c2e664a81.tar.gz frameworks_base-7ff48839b0149eba1ab46cfd1476854c2e664a81.tar.bz2 |
Variety of small UI tweaks
Updates dialog padding, text opacities on dark theme, progress bar
opacity, ripple background exit speed, remove unnecessary text color
attribute from action menu item layout, fix secondary and tertiary
disabled state text colors.
BUG: 17321765
BUG: 17333263
BUG: 17322159
BUG: 17330086
Change-Id: I14473a985b2c6b853afe7db535a2443e934238e9
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/drawable/RippleBackground.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/graphics/java/android/graphics/drawable/RippleBackground.java b/graphics/java/android/graphics/drawable/RippleBackground.java index 49862bc..34e6a20 100644 --- a/graphics/java/android/graphics/drawable/RippleBackground.java +++ b/graphics/java/android/graphics/drawable/RippleBackground.java @@ -42,8 +42,9 @@ class RippleBackground { private static final float GLOBAL_SPEED = 1.0f; private static final float WAVE_TOUCH_DOWN_ACCELERATION = 1024.0f * GLOBAL_SPEED; private static final float WAVE_OPACITY_DECAY_VELOCITY = 3.0f / GLOBAL_SPEED; - private static final float WAVE_OUTER_OPACITY_VELOCITY_MAX = 4.5f * GLOBAL_SPEED; - private static final float WAVE_OUTER_OPACITY_VELOCITY_MIN = 1.5f * GLOBAL_SPEED; + private static final float WAVE_OUTER_OPACITY_EXIT_VELOCITY_MAX = 4.5f * GLOBAL_SPEED; + private static final float WAVE_OUTER_OPACITY_EXIT_VELOCITY_MIN = 1.5f * GLOBAL_SPEED; + private static final float WAVE_OUTER_OPACITY_ENTER_VELOCITY = 10.0f * GLOBAL_SPEED; private static final float WAVE_OUTER_SIZE_INFLUENCE_MAX = 200f; private static final float WAVE_OUTER_SIZE_INFLUENCE_MIN = 40f; @@ -285,7 +286,7 @@ class RippleBackground { public void enter() { final int radiusDuration = (int) (1000 * Math.sqrt(mOuterRadius / WAVE_TOUCH_DOWN_ACCELERATION * mDensity) + 0.5); - final int outerDuration = (int) (1000 * 1.0f / WAVE_OUTER_OPACITY_VELOCITY_MIN); + final int outerDuration = (int) (1000 * 1.0f / WAVE_OUTER_OPACITY_ENTER_VELOCITY); final ObjectAnimator cX = ObjectAnimator.ofFloat(this, "xGravity", 1); cX.setAutoCancel(true); @@ -328,8 +329,8 @@ class RippleBackground { final float outerSizeInfluence = MathUtils.constrain( (mOuterRadius - WAVE_OUTER_SIZE_INFLUENCE_MIN * mDensity) / (WAVE_OUTER_SIZE_INFLUENCE_MAX * mDensity), 0, 1); - final float outerOpacityVelocity = MathUtils.lerp(WAVE_OUTER_OPACITY_VELOCITY_MIN, - WAVE_OUTER_OPACITY_VELOCITY_MAX, outerSizeInfluence); + final float outerOpacityVelocity = MathUtils.lerp(WAVE_OUTER_OPACITY_EXIT_VELOCITY_MIN, + WAVE_OUTER_OPACITY_EXIT_VELOCITY_MAX, outerSizeInfluence); // Determine at what time the inner and outer opacity intersect. // inner(t) = mOpacity - t * WAVE_OPACITY_DECAY_VELOCITY / 1000 |