This is a TabLayout control with a new attribute named as tabsGravity that can be set by one of this values, center, right, left, start and end.
you should to set app:tabMode="scrollable and finally set app:tabsGravity as you need.
be noticed that tabsGravity is different with default TabLayout tabGravity
this project contains some important files in specified folder
- class file
CustomDirTabLayoutthat shold be anywhere in your java folders - attribute file
attr_custom_dir_tablayouttha should be insideres\valuesfolder in your project
<ir.mahfa.customdirtablayout.CustomDirTabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
app:tabMode="scrollable"
app:tabsGravity="right"><!-- can be right, left, center, start or end -->Licensed under MIT
