Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Read the "Adding an Action View" section from <a href="http://developer.android.com/guide/topics/ui/actionbar.html" rel="nofollow noreferrer">http://developer.android.com/guide/topics/ui/actionbar.html</a></p> <blockquote> <p>An action view is a widget that appears in the action bar as a substitute for an action item's button.</p> </blockquote> <p>You can use <code>HorizontalScrollView</code> as action view by specifying </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;menu xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;item android:id="@+id/mytabwidget" android:title="" android:icon="@drawable/ic_launcher" android:showAsAction="always" android:actionViewClass="android.widget.HorizontalScrollView" /&gt; &lt;/menu&gt; </code></pre> <p>Get reference to this <code>HorizontalScrollView</code> in <code>public boolean onCreateOptionsMenu(Menu menu)</code></p> <p>Define a <code>RadioGroup</code> with some <code>RadioButton</code> where each <code>RadioButton</code> when selected, will update its associated tabs contents. Now add this <code>RadioGroup</code> to <code>HorizontalScrollView</code> which you will get in <code>public boolean onCreateOptionsMenu(Menu menu)</code></p> <p>You can use <code>selectTab(ActionBar.Tab tab)</code> or some other equivalent method to update tabs contents.</p> <p>You can change the look of <code>RadioButton</code> by setting <code>android:button</code> to transparent image and then setting some <code>StateListDrawable</code> with states checked, selected and normal..</p> <p>See below screen I got using this method.</p> <p><img src="https://i.stack.imgur.com/PRNuM.png" alt="enter image description here"></p> <p>In above image, each <code>RadioButton</code> when checked, selects different tab.</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. VO
      singulars
      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