Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I came up with this solution after six hrs effort on it..</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" &gt; &lt;FrameLayout android:id="@+id/realtabcontent" android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1" /&gt; &lt;android.support.v4.app.FragmentTabHost android:id="@android:id/tabhost" android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;FrameLayout android:id="@android:id/tabcontent" android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="0" /&gt; &lt;/android.support.v4.app.FragmentTabHost&gt; &lt;/LinearLayout&gt; </code></pre> <p><strong>Update:</strong></p> <p>For implementing custom tabs:</p> <pre><code>mTabHost.addTab(setIndicator(mTabHost.newTabSpec("Tab1"), R.drawable.image1), public TabSpec setIndicator(Context ctx,TabSpec spec, int resid) { // TODO Auto-generated method stub View v = LayoutInflater.from(ctx).inflate(R.layout.tabs_text, null); v.setBackgroundResource(resid); TextView text = (TextView) v.findViewById(R.id.tab_title); text.setText(spec.getTag()); return spec.setIndicator(v); } </code></pre> <p>Parameter resid as Drawable like below :</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;item android:drawable="@drawable/tab_compose_h" android:state_selected="true"/&gt; &lt;item android:drawable="@drawable/tab_compose_h" android:state_pressed="true"/&gt; &lt;item android:drawable="@drawable/tab_compose"/&gt; &lt;/selector&gt; </code></pre> <p><a href="https://github.com/rameshkec85/BottomTabsFragmentTabHost">https://github.com/rameshkec85/BottomTabsFragmentTabHost</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. 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