Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>I'll suggest you use <a href="http://actionbarsherlock.com/" rel="nofollow noreferrer">ActionBarSherlock</a>. There is one sample available in the library named "Style ActionBar". (this is only way you can change ActionBar tabs underline color)</strong></p> <p>if you have customized ActionBar then You have to add this style in ActionBar Style</p> <p>or here is way how to Do this</p> <p><img src="https://i.stack.imgur.com/qmxIS.png" alt="enter image description here"></p> <p>create style like below (here i have used ActionBarShareLock if you don't want to use then use <strong>android-support-v4.jar</strong> for support all Android OS Version)</p> <pre><code>&lt;style name="Theme.AndroidDevelopers" parent="Theme.Sherlock.Light"&gt; &lt;item name="android:actionBarTabStyle"&gt;@style/MyActionBarTabStyle&lt;/item&gt; &lt;item name="actionBarTabStyle"&gt;@style/MyActionBarTabStyle&lt;/item&gt; &lt;/style&gt; &lt;!-- style for the tabs --&gt; &lt;style name="MyActionBarTabStyle" parent="Widget.Sherlock.Light.ActionBar.TabBar"&gt; &lt;item name="android:background"&gt;@drawable/actionbar_tab_bg&lt;/item&gt; &lt;item name="android:paddingLeft"&gt;32dp&lt;/item&gt; &lt;item name="android:paddingRight"&gt;32dp&lt;/item&gt; </code></pre> <h2> </h2> <p>actionbar_tab_bg.xml</p> <p></p> <pre><code>&lt;item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/ad_tab_unselected_holo" /&gt; &lt;item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/ad_tab_selected_holo" /&gt; &lt;item android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/ad_tab_selected_pressed_holo" /&gt; &lt;item android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/ad_tab_selected_pressed_holo" /&gt; </code></pre> <p></p> <p>applay this style in your activity in android manifest file</p> <pre><code>&lt;activity android:name="com.example.tabstyle.MainActivity" android:label="@string/app_name" android:theme="@style/Theme.AndroidDevelopers" &gt; </code></pre> <p>for more detail check this <a href="https://stackoverflow.com/a/15787170/1168654">answer</a> and this <a href="http://developer.android.com/guide/topics/ui/actionbar.html#Style" rel="nofollow noreferrer">article</a>.</p> <hr> <p><strong>EDITED : 29-09-2015</strong></p> <p><strong>ActionBarSherlock</strong> is deprecated so alternatively you can use android <code>design</code> support library and android app <code>appcompat</code> library for TOOLBAR(Action-Bar is deprecated so..) and TABS.</p> <p>use <code>TabLayout</code> like below</p> <pre><code>&lt;android.support.design.widget.TabLayout android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabGravity="center" app:tabMode="scrollable" app:tabSelectedTextColor="@color/white" app:tabIndicatorColor="@color/colorPrimary" app:tabIndicatorHeight="2dip" app:tabTextAppearance="?android:attr/textAppearanceMedium" app:tabTextColor="@color/colorAccent" /&gt; </code></pre> <p><a href="https://github.com/dhaval0122/DJ-Android-" rel="nofollow noreferrer">here is sample of android design support library with tab</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload