Note that there are some explanatory texts on larger screens.

plurals
  1. POTabs at bottom of page programatically
    primarykey
    data
    text
    <p>I have researched alot that how can I align the tabs at the bottom of page using this code but I didn't find any content, I am usin the code as:</p> <pre><code> public class MainActivity extends TabActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TabHost tabHost = getTabHost(); tabHost.addTab(tabHost.newTabSpec("tab1") .setIndicator("Home") .setContent(new Intent(this, TabGroup1Activity.class))); tabHost.addTab(tabHost.newTabSpec("tab2") .setIndicator("Search"/*, getResources().getDrawable(R.drawable.ic_launcher)*/) .setContent(new Intent(this, TabGroup2Activity.class)) ); tabHost.addTab(tabHost.newTabSpec("tab3") .setIndicator("About Us") .setContent(new Intent(this, TabGroup3Activity.class))); tabHost.getTabWidget().setCurrentTab(0); tabHost.getTabWidget().setGravity(Gravity.BOTTOM); </code></pre> <p>And the TabGroup1Activity is:</p> <pre><code> public class TabGroup1Activity extends TabGroupActivity{ @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); startChildActivity("HomeActivity", new Intent(this,HomeActivity.class)); } </code></pre> <p>}</p> <p>By using this code, the tab bar is coming at the top of the screen but I want to place it at the bottom ..Please suggest something and I found this method is quite easy for creating tabs</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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