本文整理汇总了Java中android.support.design.widget.TabLayout.setSelectedTabIndicatorHeight方法的典型用法代码示例。如果您正苦于以下问题:Java TabLayout.setSelectedTabIndicatorHeight方法的具体用法?Java TabLayout.setSelectedTabIndicatorHeight怎么用?Java TabLayout.setSelectedTabIndicatorHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.design.widget.TabLayout
的用法示例。
在下文中一共展示了TabLayout.setSelectedTabIndicatorHeight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import android.support.design.widget.TabLayout; //导入方法依赖的package包/类
@SuppressWarnings("ConstantConditions")
@Override
protected void onCreate(Bundle savedInstanceState) {
mTinyDB = new TinyDB(this);
mDarkTheme = mTinyDB.getBoolean(getString(R.string.dark_theme_pref), false);
if (mDarkTheme) {
setTheme(R.style.AppThemeDark_NoActionBar);
} else {
setTheme(R.style.AppTheme_NoActionBar);
}
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
sInstance = this;
//Initialize SearchListAdapter with proper dark theme value
SearchListAdapter.getInstance(this, mDarkTheme);
mDbHelper = DatabaseHelper.getInstance(this);
// App intro
introOnFirstStart();
setUpUI();
// Fragments manager to populate the tabs
mFragmentManager = getSupportFragmentManager();
mSectionsPagerAdapter = new SectionsPagerAdapter(this, mFragmentManager, mDarkTheme);
// Set up the ViewPager with the sections adapter.
mViewPager = (NonSwipeableViewPager) findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
// Set up the tab layout
tabLayout = (TabLayout) findViewById(R.id.tabLayout);
tabLayout.setupWithViewPager(mViewPager);
tabLayout.setSelectedTabIndicatorHeight(8);
//TABLES
loadProjects();
// Select favorite project
selectFavoriteProject();
// Set up drawers in background tasks
setUpDrawers();
setRightDrawerSate();
}