am 31e152e3: am de65b7c0: Merge "Fix the position of emoji palette"

* commit '31e152e38012ddba520fc7efc527a2713e8166c1':
  Fix the position of emoji palette
main
Satoshi Kataoka 2013-10-09 21:00:25 -07:00 committed by Android Git Automerger
commit 6deea22cf1
1 changed files with 5 additions and 1 deletions

View File

@ -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);
}