Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6984851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:36:11+00:00 2026-05-27T18:36:11+00:00

I have an ActionBar in an app, and it has navigation tabs embedded in

  • 0

I have an ActionBar in an app, and it has navigation tabs embedded in it (not TabHost!). By default the tabs show as dark grey, with a thin blue line under all the tabs, and a blue marker on the selected tab.

Which styles do I override to change those colours?

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:36:12+00:00Added an answer on May 27, 2026 at 6:36 pm

    I have not changed the tabs themselves, but I would assume that you can do it with these styles from styles.xml…

     <style name="Widget.Holo.TabWidget" parent="Widget.TabWidget">
            <item name="android:tabStripLeft">@null</item>
            <item name="android:tabStripRight">@null</item>
            <item name="android:tabStripEnabled">false</item>
            <item name="android:divider">?android:attr/dividerVertical</item>
            <item name="android:showDividers">middle</item>
            <item name="android:dividerPadding">8dip</item>
            <item name="android:measureWithLargestChild">true</item>
            <item name="android:tabLayout">@android:layout/tab_indicator_holo</item>
        </style>
    

    with tab_indicator_holo.xml

      <selector xmlns:android="http://schemas.android.com/apk/res/android">
            <!-- Non focused states -->
            <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected_holo" />
            <item android:state_focused="false" android:state_selected="true"  android:state_pressed="false" android:drawable="@drawable/tab_selected_holo" />
    
            <!-- Focused states -->
            <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected_focused_holo" />
            <item android:state_focused="true" android:state_selected="true"  android:state_pressed="false" android:drawable="@drawable/tab_selected_focused_holo" />
    
            <!-- Pressed -->
            <!--    Non focused states -->
            <item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_holo" />
            <item android:state_focused="false" android:state_selected="true"  android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_holo" />
    
            <!--    Focused states -->
            <item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_focused_holo" />
            <item android:state_focused="true" android:state_selected="true"  android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_focused_holo" />
        </selector>
    

    Or you may also try

       <style name="Widget.Holo.ActionBar.TabView" parent="Widget.ActionBar.TabView">
                <item name="android:background">@drawable/tab_indicator_ab_holo</item>
                <item name="android:paddingLeft">16dip</item>
                <item name="android:paddingRight">16dip</item>
            </style>
    

    and tab_indicator_ab_holo.xml

       <selector xmlns:android="http://schemas.android.com/apk/res/android">
            <!-- Non focused states -->
            <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@color/transparent" />
            <item android:state_focused="false" android:state_selected="true"  android:state_pressed="false" android:drawable="@drawable/tab_selected_holo" />
    
            <!-- Focused states -->
            <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/list_focused_holo" />
            <item android:state_focused="true" android:state_selected="true"  android:state_pressed="false" android:drawable="@drawable/tab_selected_focused_holo" />
    
            <!-- Pressed -->
            <!--    Non focused states -->
            <item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/list_pressed_holo_dark" />
            <item android:state_focused="false" android:state_selected="true"  android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_holo" />
    
            <!--    Focused states -->
            <item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_holo" />
            <item android:state_focused="true" android:state_selected="true"  android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_holo" />
        </selector>
    

    Finally using the two png-9 drawables: tab_selected_holo and tab_unselected_holo. They look like the two thicker and thinner blue lines you are talking about.

    Or do you mean the minitabs?

     <style name="Widget.ActionBar.TabView" parent="Widget">
            <item name="android:gravity">center_horizontal</item>
            <item name="android:background">@drawable/minitab_lt</item>
            <item name="android:paddingLeft">4dip</item>
            <item name="android:paddingRight">4dip</item>
        </style>
    

    with in minitab_lt.xml

     <selector xmlns:android="http://schemas.android.com/apk/res/android">
        <item android:state_pressed="true" android:state_selected="true"
              android:drawable="@drawable/minitab_lt_press" />
        <item android:state_selected="true"
              android:drawable="@drawable/minitab_lt_selected" />
        <item android:state_pressed="true"
              android:drawable="@drawable/minitab_lt_unselected_press" />
        <item android:drawable="@drawable/minitab_lt_unselected" />
    </selector>
    

    If you need another definition just search for TabWidget in here: https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/styles.xml

    Then as usual define your own style with all the required attributes and drawables…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've a requirement to show tabs in an app. I've actually never used TabHost
I have an Android app that uses ActionBar Sherlock. I create a menu that
I have implemented the action bar (not the quick action bar) in my app.
I would like to have a dark ActionBar but have the rest of the
I have a tabhost with three tabs. Each is an activity. I would like
I have an app that's built for Android 2.2, so I'm not using the
I am building an app that consists of actionbar with tabs, and each tab
I have developed an android app that mainly targets smartphones. However in tablet emulator
I have an app that in a certain Activity (drawing) can be in any
I wanted to implement the ActionBar (Android 4.0) in a test App to see

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.