[Android] SlidingDrawableTabLayout

来源:互联网 发布:淘宝网旗袍金丝绒 编辑:程序博客网 时间:2024/05/21 10:23

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

查看原文:http://legendmohe.net/2016/05/20/android-slidingdrawabletablayout/

0 0
原创粉丝点击