diff options
author | 2013-04-19 07:06:36 -0700 | |
---|---|---|
committer | 2013-04-19 07:06:36 -0700 | |
commit | 6f6974e6e9a2b177cf1355395e52652b49a13c3a (patch) | |
tree | ded0044930ce50851a06d894c2c86dc0879cd2de /java/src | |
parent | 6dc9933d83c166b57dcfc42d5738423cde2e5bee (diff) | |
parent | 825da76c72d420e8c43c7334cf273ba9e5da59fe (diff) | |
download | latinime-6f6974e6e9a2b177cf1355395e52652b49a13c3a.tar.gz latinime-6f6974e6e9a2b177cf1355395e52652b49a13c3a.tar.xz latinime-6f6974e6e9a2b177cf1355395e52652b49a13c3a.zip |
am 825da76c: Redisplay a hidden button after it entered the screen again.
* commit '825da76c72d420e8c43c7334cf273ba9e5da59fe':
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.java | 5 |
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; } } |