aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-05-15 10:52:49 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-05-15 10:52:49 -0700
commit643bdb0ff4ed3f4c45d3851efb285eb910cd1d8d (patch)
treec6bf3da5828ddb8b56fa8642238178c63a06ce0b /java/src
parent12e180a6c32050da8c2078e673b1bf39b7685807 (diff)
parent6f6974e6e9a2b177cf1355395e52652b49a13c3a (diff)
downloadlatinime-643bdb0ff4ed3f4c45d3851efb285eb910cd1d8d.tar.gz
latinime-643bdb0ff4ed3f4c45d3851efb285eb910cd1d8d.tar.xz
latinime-643bdb0ff4ed3f4c45d3851efb285eb910cd1d8d.zip
am 6f6974e6: am 825da76c: Redisplay a hidden button after it entered the screen again.
* commit '6f6974e6e9a2b177cf1355395e52652b49a13c3a': Redisplay a hidden button after it entered the screen again.
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;
}
}