Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One way to do this would be to use a custom <code>Selector</code> for the tab states that is identical regardless of whether or not the tab has focus. This might look something like this:</p> <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;!-- Non focused states --&gt; &lt;item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected" /&gt; &lt;item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_unselected" /&gt; &lt;!-- Focused states --&gt; &lt;item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected" /&gt; &lt;item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_unselected" /&gt; &lt;!-- Pressed --&gt; &lt;item android:state_pressed="true" android:drawable="@drawable/tab_press" /&gt; &lt;/selector&gt; </code></pre> <p>You'd add that to your drawable directory, and then configure your tabwidget to use that in your activity (like so):</p> <pre><code>TabWidget tabWidget = getTabWidget(); for(int i = 0; i &lt; tabWidget.getChildCount(); i++) { RelativeLayout tabLayout = (RelativeLayout) tabWidget.getChildAt(i); tabLayout.setBackgroundDrawable(res.getDrawable(R.drawable.tab_indicator)); } </code></pre> <p>A much more detailed guide is <a href="http://ondrejcermak.info/programovani/custom-tabs-in-android-tutorial/comment-page-1/" rel="nofollow">here</a>. See if that works for you.</p>
    singulars
    1. This table or related slice is empty.
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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