Skip to content Skip to sidebar Skip to footer

Android Elements Have White Background Behind The Text On Pre-lollipop And Lower Api Versions

I use TabLayout for ViewPager Copy

and in your style file

<stylename="MyCustomTabLayout"parent="Widget.Design.TabLayout"><itemname="tabTextAppearance">@style/MyCustomTabText</item><itemname="tabSelectedTextColor">@color/ColorPrimary</item></style>

Solution 2:

Make tab_background.xml in drawable folder and set app:tabBackground="@drawable/tab_background" to your tablayour like below:

<?xml version="1.0" encoding="utf-8"?><selectorxmlns:android="http://schemas.android.com/apk/res/android"><itemandroid:drawable="@color/tab_background_selected"android:state_selected="true"/><itemandroid:drawable="@color/tab_background_unselected"/>

<android.support.design.widget.TabLayout....app:tabBackground="@drawable/tab_background"...
/>

Post a Comment for "Android Elements Have White Background Behind The Text On Pre-lollipop And Lower Api Versions"