I am using android.support.design.widget.TabLayout.
I want to set a vertical line separator that separate one tab with an another.
I could not find any property that I can set at Xml or code level.
Please advise.
<android.support.design.widget.TabLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/tab_layout"
android:layout_width="match_parent"
app:tabIndicatorHeight="2dp"
android:theme="@style/ArticlesTabLayout" />
Code that attach TabLayout with pager:
TabLayout tabLayout = getTabLayout();
tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
tabLayout.setupWithViewPager(viewPager);
Style is:
<style name="ArticlesTabLayout" parent="Widget.Design.TabLayout">
<item name="tabMaxWidth">@dimen/tab_max_width</item>
<item name="tabIndicatorColor">@color/cba_yellow</item>
<item name="tabIndicatorHeight">2dp</item>
<item name="tabPaddingStart">12dp</item>
<item name="tabPaddingEnd">12dp</item>
<item name="tabBackground">@color/cba_white</item>
<item name="tabTextAppearance">@style/ArticleTabTextAppearance</item>
<item name="tabSelectedTextColor">?android:textColorPrimary</item>
</style>
<style name="ArticleTabTextAppearance" parent="TextAppearance.Design.Tab">
<item name="android:textSize">14sp</item>
<item name="android:textColor">?android:textColorSecondary</item>
<item name="textAllCaps">false</item>
</style>
- I am also keen to know how I can add custom view?
- Why textAllCaps is not working, it is still showing in Caps.?
- How I can put a vertical divider?