aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-10-08 12:04:03 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-08 12:04:03 +0000
commitde65b7c0b36963de0f5c4f5cede543b247a8ccd7 (patch)
treed7d4986b23eb6c14b656bc86e8ecd079cb2de67c /java/src/com/android/inputmethod
parentc040d59defe38ce4b55e54dc8859db2e48307f1f (diff)
parentf981fe7ed23b269676a95f953728d74f82f68e4b (diff)
downloadlatinime-de65b7c0b36963de0f5c4f5cede543b247a8ccd7.tar.gz
latinime-de65b7c0b36963de0f5c4f5cede543b247a8ccd7.tar.xz
latinime-de65b7c0b36963de0f5c4f5cede543b247a8ccd7.zip
Merge "Fix the position of emoji palette"
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r--java/src/com/android/inputmethod/keyboard/EmojiPalettesView.java6
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);
}