Is it possible to remove the bottom line showed in the tab bar? It is grey when not selected.
And is it possible to change the yellowish color to something else?
For disabling that line below use tab:
app:tabIndicator="@null"
android:tabStripEnabled="false" didnt work for me
By doing the following i was able to get it working
<android.support.design.widget.TabLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabIndicatorColor="@android:color/transparent"
app:tabIndicatorHeight="0dp" />
These 2 are the main things
app:tabIndicatorColor="@android:color/transparent"
app:tabIndicatorHeight="0dp"
you have customize your tab indicator. that is to overriding your tabwidget style. I had this problem already. check these two posts. post1 and post2 . Hope it helps.
In AndroidManifest.xml:
<activity android:name=".ActivityName" android:theme="@style/tabTheme"/>
In values/styles.xml:
<style name="tabTheme" parent="android:style/Theme">
<item name="android:tabWidgetStyle">@style/Widget.TabWidget</item>
</style>
<style name="Widget.TabWidget" parent="android:Theme">
<item name="android:tabStripEnabled">false</item>
</style>
just do this in your tabWidget in your xml file.
android:tabStripEnabled="false"
hope you get it. ;)
Finally I solved it by:
android:alpha="0"
Here the full code:
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:tabStripEnabled="false"
android:alpha="0"
style="@style/TabStyle" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</TabHost>