summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorSergey Vasilinets <sergeyv@google.com>2017-07-28 21:46:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-07-28 21:46:43 +0000
commit2cf8f916379700096896f762ce68b760ef2b8c61 (patch)
tree55cba474bdba309f0c99195c1ba9da7434186dd4 /core/java
parent6e527d0ec5ea361419b51a6a8de3a709571605d7 (diff)
parentebfaca5246c35b8003240aa7e4ff54a6d4aca6fb (diff)
Merge "Revert "Revert "Update overscroll and toast UI""" into oc-dr1-dev
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/widget/EdgeEffect.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/java/android/widget/EdgeEffect.java b/core/java/android/widget/EdgeEffect.java
index 98d8a13d68b5..f9f5901a6651 100644
--- a/core/java/android/widget/EdgeEffect.java
+++ b/core/java/android/widget/EdgeEffect.java
@@ -59,7 +59,8 @@ public class EdgeEffect {
// Time it will take in ms for a pulled glow to decay to partial strength before release
private static final int PULL_DECAY_TIME = 2000;
- private static final float MAX_ALPHA = 0.5f;
+ private static final float MAX_ALPHA = 0.15f;
+ private static final float GLOW_ALPHA_START = .09f;
private static final float MAX_GLOW_SCALE = 2.f;
@@ -75,6 +76,7 @@ public class EdgeEffect {
private static final double ANGLE = Math.PI / 6;
private static final float SIN = (float) Math.sin(ANGLE);
private static final float COS = (float) Math.cos(ANGLE);
+ private static final float RADIUS_FACTOR = 0.6f;
private float mGlowAlpha;
private float mGlowScaleY;
@@ -134,10 +136,10 @@ public class EdgeEffect {
* @param height Effect height in pixels
*/
public void setSize(int width, int height) {
- final float r = width * 0.75f / SIN;
+ final float r = width * RADIUS_FACTOR / SIN;
final float y = COS * r;
final float h = r - y;
- final float or = height * 0.75f / SIN;
+ final float or = height * RADIUS_FACTOR / SIN;
final float oy = COS * or;
final float oh = or - oy;
@@ -272,7 +274,7 @@ public class EdgeEffect {
// The glow depends more on the velocity, and therefore starts out
// nearly invisible.
- mGlowAlphaStart = 0.3f;
+ mGlowAlphaStart = GLOW_ALPHA_START;
mGlowScaleYStart = Math.max(mGlowScaleY, 0.f);