diff options
author | 2013-10-09 21:00:25 -0700 | |
---|---|---|
committer | 2013-10-09 21:00:25 -0700 | |
commit | 6deea22cf1957cc2bb90eec762e0752aba194ad7 (patch) | |
tree | b0410d9a4a8ed276abe6ea68d3750818d603c16e /java/src | |
parent | ef2add6f1a6e54dd8ab8574d05567ebdb27cd0fc (diff) | |
parent | 31e152e38012ddba520fc7efc527a2713e8166c1 (diff) | |
download | latinime-6deea22cf1957cc2bb90eec762e0752aba194ad7.tar.gz latinime-6deea22cf1957cc2bb90eec762e0752aba194ad7.tar.xz latinime-6deea22cf1957cc2bb90eec762e0752aba194ad7.zip |
am 31e152e3: am de65b7c0: Merge "Fix the position of emoji palette"
* commit '31e152e38012ddba520fc7efc527a2713e8166c1':
Fix the position of emoji palette
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java index 4f5961175..9779c683c 100644 --- a/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java +++ b/java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java @@ -84,6 +84,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange private TabHost mTabHost; private ViewPager mEmojiPager; + private int mCurrentPagerPosition = 0; private EmojiCategoryPageIndicatorView mEmojiCategoryPageIndicatorView; private KeyboardActionListener mKeyboardActionListener = KeyboardActionListener.EMPTY_LISTENER; @@ -507,6 +508,7 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange setCurrentCategoryId(newPos.first /* categoryId */, false /* force */); mEmojiCategory.setCurrentCategoryPageId(newPos.second /* categoryPageId */); updateEmojiCategoryPageIdView(); + mCurrentPagerPosition = position; } @Override @@ -569,15 +571,17 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange public void startEmojiPalettes() { if (DEBUG_PAGER) { - Log.d(TAG, "allocate emoji palettes memory"); + Log.d(TAG, "allocate emoji palettes memory " + mCurrentPagerPosition); } mEmojiPager.setAdapter(mEmojiPalettesAdapter); + mEmojiPager.setCurrentItem(mCurrentPagerPosition); } public void stopEmojiPalettes() { if (DEBUG_PAGER) { Log.d(TAG, "deallocate emoji palettes memory"); } + mEmojiPalettesAdapter.flushPendingRecentKeys(); mEmojiPager.setAdapter(null); } |