[Android] SlidingDrawableTabLayout

TabLayout with drawable indicator

demo.gif

Usage

gradle

compile 'com.legendmohe.maven:slidingdrawabletablayout:0.1'

code

Just use it as TabLayout:

// Create the adapter that will return a fragment for each of the three
// primary sections of the activity.
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());

// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);

SlidingDrawableTabLayout tabLayout = (SlidingDrawableTabLayout) findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);    

发表评论

您的电子邮箱地址不会被公开。

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据