aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-10-08 05:06:39 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-10-08 05:06:39 -0700
commit31e152e38012ddba520fc7efc527a2713e8166c1 (patch)
treeaaf0a3d02f7e0c7b869a82944f82a1a7538b62a0 /java/src
parent1d24f19b00f93fa5ee14b68d7c862c73485b90b1 (diff)
parentde65b7c0b36963de0f5c4f5cede543b247a8ccd7 (diff)
downloadlatinime-31e152e38012ddba520fc7efc527a2713e8166c1.tar.gz
latinime-31e152e38012ddba520fc7efc527a2713e8166c1.tar.xz
latinime-31e152e38012ddba520fc7efc527a2713e8166c1.zip
am de65b7c0: Merge "Fix the position of emoji palette"
* commit 'de65b7c0b36963de0f5c4f5cede543b247a8ccd7': Fix the position of emoji palette
Diffstat (limited to 'java/src')
-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);
}