Loading java/src/com/android/inputmethod/dictionarypack/ButtonSwitcher.java +3 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ public class ButtonSwitcher extends FrameLayout { new AnimatorListenerAdapter() { @Override public void onAnimationEnd(final Animator animation) { if (newStatus != mStatus) return; animateButton(newButton, ANIMATION_IN); } }); Loading @@ -144,8 +145,10 @@ public class ButtonSwitcher extends FrameLayout { final float outerX = getWidth(); final float innerX = button.getX() - button.getTranslationX(); if (ANIMATION_IN == direction) { button.setClickable(true); return button.animate().translationX(0); } else { button.setClickable(false); return button.animate().translationX(outerX - innerX); } } Loading java/src/com/android/inputmethod/dictionarypack/WordListPreference.java +2 −1 Original line number Diff line number Diff line Loading @@ -219,8 +219,9 @@ public final class WordListPreference extends Preference { final ListView listView = (ListView)parent; final int indexToOpen; // Close all first, we'll open back any item that needs to be open. final boolean wasOpen = mInterfaceState.isOpen(mWordlistId); mInterfaceState.closeAll(); if (mInterfaceState.isOpen(mWordlistId)) { if (wasOpen) { // This button being shown. Take note that we don't want to open any button in the // loop below. indexToOpen = -1; Loading Loading
java/src/com/android/inputmethod/dictionarypack/ButtonSwitcher.java +3 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ public class ButtonSwitcher extends FrameLayout { new AnimatorListenerAdapter() { @Override public void onAnimationEnd(final Animator animation) { if (newStatus != mStatus) return; animateButton(newButton, ANIMATION_IN); } }); Loading @@ -144,8 +145,10 @@ public class ButtonSwitcher extends FrameLayout { final float outerX = getWidth(); final float innerX = button.getX() - button.getTranslationX(); if (ANIMATION_IN == direction) { button.setClickable(true); return button.animate().translationX(0); } else { button.setClickable(false); return button.animate().translationX(outerX - innerX); } } Loading
java/src/com/android/inputmethod/dictionarypack/WordListPreference.java +2 −1 Original line number Diff line number Diff line Loading @@ -219,8 +219,9 @@ public final class WordListPreference extends Preference { final ListView listView = (ListView)parent; final int indexToOpen; // Close all first, we'll open back any item that needs to be open. final boolean wasOpen = mInterfaceState.isOpen(mWordlistId); mInterfaceState.closeAll(); if (mInterfaceState.isOpen(mWordlistId)) { if (wasOpen) { // This button being shown. Take note that we don't want to open any button in the // loop below. indexToOpen = -1; Loading