diff options
author | Mindy Pereira <mindyp@google.com> | 2010-11-24 15:32:39 -0800 |
---|---|---|
committer | Mindy Pereira <mindyp@google.com> | 2010-11-24 16:09:03 -0800 |
commit | 4e30d89ceda832300f80bf73f4f58cd2b51bf112 (patch) | |
tree | 035622b0a49caa60ae9d72db3965ad813fdcc769 /core/java/android/webkit/OverScrollGlow.java | |
parent | d9d618ffbc03b8340b62b7fdb446e4a0a19aa318 (diff) | |
download | frameworks_base-4e30d89ceda832300f80bf73f4f58cd2b51bf112.zip frameworks_base-4e30d89ceda832300f80bf73f4f58cd2b51bf112.tar.gz frameworks_base-4e30d89ceda832300f80bf73f4f58cd2b51bf112.tar.bz2 |
Per designers, update the algorithm for when effect is clipped or stretched.
New algo is:
1) if view width < MIN_WIDTH (currently 300px), clip glow and edge to fit
2) else stretch glow and edge to fill width
3) make alpha and height of edge and glow 30% "more intense"
Change-Id: I8f121bb165a8fb835bc33950dbedd1bc80c5df65
Diffstat (limited to 'core/java/android/webkit/OverScrollGlow.java')
-rw-r--r-- | core/java/android/webkit/OverScrollGlow.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/java/android/webkit/OverScrollGlow.java b/core/java/android/webkit/OverScrollGlow.java index 53600f6..af56a2f 100644 --- a/core/java/android/webkit/OverScrollGlow.java +++ b/core/java/android/webkit/OverScrollGlow.java @@ -17,6 +17,7 @@ package android.webkit; import com.android.internal.R; +import android.content.Context; import android.content.res.Resources; import android.graphics.Canvas; import android.graphics.drawable.Drawable; @@ -40,13 +41,14 @@ public class OverScrollGlow { public OverScrollGlow(WebView host) { mHostView = host; - final Resources res = host.getContext().getResources(); + Context context = host.getContext(); + final Resources res = context.getResources(); final Drawable edge = res.getDrawable(R.drawable.overscroll_edge); final Drawable glow = res.getDrawable(R.drawable.overscroll_glow); - mEdgeGlowTop = new EdgeGlow(edge, glow); - mEdgeGlowBottom = new EdgeGlow(edge, glow); - mEdgeGlowLeft = new EdgeGlow(edge, glow); - mEdgeGlowRight = new EdgeGlow(edge, glow); + mEdgeGlowTop = new EdgeGlow(context, edge, glow); + mEdgeGlowBottom = new EdgeGlow(context, edge, glow); + mEdgeGlowLeft = new EdgeGlow(context, edge, glow); + mEdgeGlowRight = new EdgeGlow(context, edge, glow); } /** |