- Download CircularIndicatorTabLayout aar file from here:
- Move
circular-idicator-tab-layout-1.0.0.aar
toapp/libs
- In project build.gradle file add
repositories { flatDir { dirs 'libs' } }
- In app build.gradle file add
compile(name: 'circular-idicator-tab-layout-1.0.0', ext: 'aar')
<np.com.ngimasherpa.citablayout.CircularIndicatorTabLayout
android:id="@+id/tab_monitoring_criteria"
android:layout_width="match_parent"
android:layout_height="@dimen/spacing_72"
app:iconColor="@color/colorPrimaryDark"
app:indicatorColor="@color/colorAccent"
app:indicatorPosition="bottom"
app:lineColor="@android:color/holo_red_dark"
app:lineEnabled="true"
app:mode="fixed"
app:selectedIconColor="@color/colorAccent"
app:tabViewIconId="@+id/iconTabViewLayout"
app:tabViewLayoutId="@layout/tab_layout"
app:tabViewTextViewColor="@color/colorPrimaryDark"
app:tabViewTextViewId="@+id/textTabViewLayout"
app:tabViewTextViewSelectedColor="@color/colorAccent"
app:tab_gravity="fill" />
SectionPagerAdapter mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
ViewPager mViewPager = (ViewPager) findViewById(R.id.container);
CircularIndicatorTabLayout tabLayout = (CircularIndicatorTabLayout) findViewById(R.id.tab_monitoring_criteria);
mViewPager.setAdapter(mSectionsPagerAdapter);
tabLayout.setupWithViewPager(mViewPager);
tabLayout.setIcons(
R.drawable.ic_arrow_drop_down,
R.drawable.ic_audiotrack,
R.drawable.ic_beach);