From 6912342a48b9ebf6f4dcd714b697eadac48afbde Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Mon, 8 Jul 2013 18:46:33 +0900 Subject: Fix a bug with bad view reuse. There are many ways to fix this problem but this is the most direct way. Removing a view from the cache when any animation is started will ensure it won't be used again, and will be garbage collected when it's possible. Since views are created on demand anyway, a new one will just get created when needed, and that's it. Bug: 9400128 Change-Id: I4945d2859d642e79694d51ae90cf4f5bde9a5f1d --- .../inputmethod/dictionarypack/DictionaryListInterfaceState.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'java/src/com/android/inputmethod/dictionarypack/DictionaryListInterfaceState.java') diff --git a/java/src/com/android/inputmethod/dictionarypack/DictionaryListInterfaceState.java b/java/src/com/android/inputmethod/dictionarypack/DictionaryListInterfaceState.java index f1a2a8333..13c07de35 100644 --- a/java/src/com/android/inputmethod/dictionarypack/DictionaryListInterfaceState.java +++ b/java/src/com/android/inputmethod/dictionarypack/DictionaryListInterfaceState.java @@ -80,4 +80,8 @@ public class DictionaryListInterfaceState { mViewCache.add(view); return view; } + + public void removeFromCache(final View view) { + mViewCache.remove(view); + } } -- cgit v1.2.3-83-g751a