Merge "Suppress emoji tabs on JB-MR2 or previous versions"

This commit is contained in:
Satoshi Kataoka 2013-09-12 10:58:28 +00:00 committed by Android (Google) Code Review
commit 28af9ed19e

View file

@ -22,6 +22,7 @@ import android.content.Context;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.content.res.Resources; import android.content.res.Resources;
import android.content.res.TypedArray; import android.content.res.TypedArray;
import android.os.Build;
import android.support.v4.view.PagerAdapter; import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.util.AttributeSet; import android.util.AttributeSet;
@ -177,10 +178,12 @@ public final class EmojiKeyboardView extends LinearLayout implements OnTabChange
mTabHost = (TabHost)findViewById(R.id.emoji_category_tabhost); mTabHost = (TabHost)findViewById(R.id.emoji_category_tabhost);
mTabHost.setup(); mTabHost.setup();
addTab(mTabHost, CATEGORY_RECENTS); addTab(mTabHost, CATEGORY_RECENTS);
addTab(mTabHost, CATEGORY_PEOPLE); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
addTab(mTabHost, CATEGORY_OBJECTS); addTab(mTabHost, CATEGORY_PEOPLE);
addTab(mTabHost, CATEGORY_NATURE); addTab(mTabHost, CATEGORY_OBJECTS);
addTab(mTabHost, CATEGORY_PLACES); addTab(mTabHost, CATEGORY_NATURE);
addTab(mTabHost, CATEGORY_PLACES);
}
addTab(mTabHost, CATEGORY_SYMBOLS); addTab(mTabHost, CATEGORY_SYMBOLS);
addTab(mTabHost, CATEGORY_EMOTICONS); addTab(mTabHost, CATEGORY_EMOTICONS);
mTabHost.setOnTabChangedListener(this); mTabHost.setOnTabChangedListener(this);