Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add tabs at bottom
    primarykey
    data
    text
    <p>I have a tabhost which contains three tabs, connected with three activities. All three tabs are in the upper side. How can I make these three tabs at the bottom?</p> <p>I found this, but there are still some problems.</p> <p>This is my tabhost XML file:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" /&gt; &lt;TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="0"/&gt; &lt;/LinearLayout&gt; &lt;/TabHost&gt; </code></pre> <p>In my TabActivity class, I have following code:</p> <pre><code>setContentView(R.layout.tabs); TabHost mTabHost = (TabHost)findViewById(android.R.id.tabhost); mTabHost.addTab(mTabHost.newTabSpec("tab_test1").setIndicator("TAB 1").setContent(new Intent(AndroisTabViewActivity.this,TabActivity1.class))); mTabHost.addTab(mTabHost.newTabSpec("tab_test2").setIndicator("TAB 2").setContent(new Intent(AndroisTabViewActivity.this,TabActivity1.class))); mTabHost.addTab(mTabHost.newTabSpec("tab_test3").setIndicator("TAB 3").setContent(new Intent(AndroisTabViewActivity.this,TabActivity1.class))); mTabHost.setCurrentTab(0); </code></pre> <p>There is one activity named TabActivity1 which I have also included in Manifest file. But it is showing the error:</p> <blockquote> <p>Can't get the activity TabActivity1.</p> </blockquote>
    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.
 

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