aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-04-16 21:54:22 +0900
committerJean Chalard <jchalard@google.com>2013-04-19 22:50:48 +0900
commit825da76c72d420e8c43c7334cf273ba9e5da59fe (patch)
tree754a7940583e9a8ecd6a829ebe04ebd2e23073d0 /java/src
parentf8014eea341040f8d155e071e4e0c915a7ebd61d (diff)
downloadlatinime-825da76c72d420e8c43c7334cf273ba9e5da59fe.tar.gz
latinime-825da76c72d420e8c43c7334cf273ba9e5da59fe.tar.xz
latinime-825da76c72d420e8c43c7334cf273ba9e5da59fe.zip
Redisplay a hidden button after it entered the screen again.
Bug: 7600384 Change-Id: I6cd18fd7584b6e98260cb432956f08ba9886580b
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/dictionarypack/WordListPreference.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/dictionarypack/WordListPreference.java b/java/src/com/android/inputmethod/dictionarypack/WordListPreference.java
index 37b20b4d7..93f12d53e 100644
--- a/java/src/com/android/inputmethod/dictionarypack/WordListPreference.java
+++ b/java/src/com/android/inputmethod/dictionarypack/WordListPreference.java
@@ -68,6 +68,7 @@ public final class WordListPreference extends DialogPreference {
static final private int ANIMATION_OUT = 2;
private static int sLastClickedIndex = NOT_AN_INDEX;
+ private static String sLastClickedWordlistId = null;
private final OnWordListPreferenceClick mPreferenceClickHandler =
new OnWordListPreferenceClick();
private final OnActionButtonClick mActionButtonClickHandler =
@@ -199,7 +200,8 @@ public final class WordListPreference extends DialogPreference {
((ViewGroup)view).setLayoutTransition(null);
final Button button = (Button)view.findViewById(R.id.wordlist_button);
button.setText(getButtonLabel(mStatus));
- button.setVisibility(View.INVISIBLE);
+ // String identity match. This is an ==, not an .equals, on purpose.
+ button.setVisibility(mWordlistId == sLastClickedWordlistId ? View.VISIBLE : View.INVISIBLE);
button.setOnClickListener(mActionButtonClickHandler);
view.setOnClickListener(mPreferenceClickHandler);
}
@@ -218,6 +220,7 @@ public final class WordListPreference extends DialogPreference {
animateButton(getButtonForIndex(listView, sLastClickedIndex), ANIMATION_OUT);
}
sLastClickedIndex = myIndex;
+ sLastClickedWordlistId = mWordlistId;
}
}