diff options
| author | Romain Guy <romainguy@google.com> | 2011-02-14 16:34:59 -0800 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2011-02-14 16:34:59 -0800 |
| commit | 0211a0a10d20ec99bd78905ea9cd2960f7beb4c8 (patch) | |
| tree | dbca87d7e13f32489c776d6650cdad1acd636d09 /core/java/android/view/ViewConfiguration.java | |
| parent | 676b17391fb6583e5df944c36b1bd4c1be835689 (diff) | |
Gracefully handle drawing caches allocation failure.
Bug #3431451
This bug was causing ListView to not render properly when showing an item
larger than the maximum drawing cache size. ListView relies on the drawing
cache to correctly mask all the background pixels. However, if the cache
is not properly created, the background will show through even though
ListView.isOpaque() == true. This change detects this case and falls
back to the default non opaque behavior.
Change-Id: I30a45e7a03fb7ebb2b12f0e85c075c2901954c44
Diffstat (limited to 'core/java/android/view/ViewConfiguration.java')
| -rw-r--r-- | core/java/android/view/ViewConfiguration.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 0444496c5d17..cc4e89cce417 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -152,12 +152,12 @@ public class ViewConfiguration { * should be at least equal to the size of the screen in ARGB888 format. */ @Deprecated - private static final int MAXIMUM_DRAWING_CACHE_SIZE = 320 * 480 * 4; // HVGA screen, ARGB8888 + private static final int MAXIMUM_DRAWING_CACHE_SIZE = 480 * 800 * 4; // ARGB8888 /** * The coefficient of friction applied to flings/scrolls. */ - private static float SCROLL_FRICTION = 0.015f; + private static final float SCROLL_FRICTION = 0.015f; /** * Max distance to overscroll for edge effects |
