0

I have a TabWidget. How can I change the bottom line color of the currently selected tab which is defaulted to blue at the moment?

I looked at this answer but it does not say how to change the color...

My layout/main.xml is code :

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical">

    <TabHost
        android:id="@android:id/tabhost"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical" >
            <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:alpha="0.75"
                android:focusable="false"
                android:focusableInTouchMode="false"
                android:orientation="horizontal" />

            <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_weight="0" />

            <FrameLayout
                android:id="@+id/realtabcontent"

                android:layout_width="fill_parent"
                android:layout_height="0dp"
                android:layout_weight="1" />


        </LinearLayout>
    </TabHost>

</LinearLayout>
Community
  • 1
  • 1
Kerim Baki
  • 1
  • 1
  • 4
  • Check [this][1] thread. It will help hopefully. [1]: http://stackoverflow.com/questions/14722654/tabwidget-current-tab-bottom-line-color – Mohammad Arman Apr 06 '15 at 14:19
  • I tried this solution but my app did not work:( – Kerim Baki Apr 06 '15 at 15:05
  • Try [this](http://www.exoguru.com/android/material-design/navigation/android-sliding-tabs-with-material-design.html) tutorial, all you have to do is to change the color of #004D40 to the color you want :D – edwinj Apr 06 '15 at 19:00

0 Answers0