diff options
author | 2013-10-08 20:58:47 +0900 | |
---|---|---|
committer | 2013-10-08 21:00:43 +0900 | |
commit | f981fe7ed23b269676a95f953728d74f82f68e4b (patch) | |
tree | 9e08c3beeb022b86a7b929a7f2fc52d74d3e83ee /java/src/com/android | |
parent | 0e01df9baf3d9e2fc7b9a51b683ce6df6ff547dd (diff) | |
download | latinime-f981fe7ed23b269676a95f953728d74f82f68e4b.tar.gz latinime-f981fe7ed23b269676a95f953728d74f82f68e4b.tar.xz latinime-f981fe7ed23b269676a95f953728d74f82f68e4b.zip |
Fix the position of emoji palette
Change-Id: I07a3912cb9fef8e28f3605de4e73a201a900e95c
Diffstat (limited to 'java/src/com/android')
-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); } |