title: put tabs in the bottom of screen
body: <p>I want to put tabs at the bottom part of my screen . For this purpose I have the following code :</p>
  
  <pre><code>package info.androidhive.tabsswipe;
  
  import info.androidhive.tabsswipe.adapter.TabsPagerAdapter;
  import android.app.ActionBar;
  import android.app.ActionBar.Tab;
  import android.app.FragmentTransaction;
  import android.os.Bundle;
  import android.support.v4.app.FragmentActivity;
  import android.support.v4.view.ViewPager;
  
  public class MainActivity extends FragmentActivity implements
          ActionBar.TabListener {
  
      private ViewPager viewPager;
      private TabsPagerAdapter mAdapter;
      private ActionBar actionBar;
      // Tab titles
      private String[] tabs = { "Top Rated", "Games", "Movies" };
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          // Initilization
          viewPager = (ViewPager) findViewById(R.id.pager);
          actionBar = getActionBar(); 
          mAdapter = new TabsPagerAdapter(getSupportFragmentManager());
  
          viewPager.setAdapter(mAdapter) ;
          actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
          actionBar.setDisplayShowHomeEnabled(false);
          actionBar.setDisplayShowTitleEnabled(false);
  
          // Adding Tabs
          for (String tab_name : tabs) {
              actionBar.addTab(actionBar.newTab().setText(tab_name)
                      .setTabListener(this));
          }
  
          /**
           * on swiping the viewpager make respective tab selected
           * */
          viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
  
              @Override
              public void onPageSelected(int position) {
                  // on changing the page
                  // make respected tab selected
                  actionBar.setSelectedNavigationItem(position);
              }
  
              @Override
              public void onPageScrolled(int arg0, float arg1, int arg2) {
              }
  
              @Override
              public void onPageScrollStateChanged(int arg0) {
              }
          });
      }
  
      @Override
      public void onTabReselected(Tab tab, FragmentTransaction ft) {
      }
  
      @Override
      public void onTabSelected(Tab tab, FragmentTransaction ft) {
          // on tab selected
          // show respected fragment view
          viewPager.setCurrentItem(tab.getPosition());
      }
  
      @Override
      public void onTabUnselected(Tab tab, FragmentTransaction ft) {
      }
  
  }
  </code></pre>
  
  <p>By this code , I have the following layout : </p>
  
  <pre><code>package info.androidhive.tabsswipe;
  
  import info.androidhive.tabsswipe.adapter.TabsPagerAdapter;
  import android.app.ActionBar;
  import android.app.ActionBar.Tab;
  import android.app.FragmentTransaction;
  import android.os.Bundle;
  import android.support.v4.app.FragmentActivity;
  import android.support.v4.view.ViewPager;
  
  public class MainActivity extends FragmentActivity implements
          ActionBar.TabListener {
  
      private ViewPager viewPager;
      private TabsPagerAdapter mAdapter;
      private ActionBar actionBar;
      // Tab titles
      private String[] tabs = { "Top Rated", "Games", "Movies" };
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          // Initilization
          viewPager = (ViewPager) findViewById(R.id.pager);
          actionBar = getActionBar(); 
          mAdapter = new TabsPagerAdapter(getSupportFragmentManager());
  
          viewPager.setAdapter(mAdapter) ;
          actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
          actionBar.setDisplayShowHomeEnabled(false);
          actionBar.setDisplayShowTitleEnabled(false);
  
          // Adding Tabs
          for (String tab_name : tabs) {
              actionBar.addTab(actionBar.newTab().setText(tab_name)
                      .setTabListener(this));
          }
  
          /**
           * on swiping the viewpager make respective tab selected
           * */
          viewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
  
              @Override
              public void onPageSelected(int position) {
                  // on changing the page
                  // make respected tab selected
                  actionBar.setSelectedNavigationItem(position);
              }
  
              @Override
              public void onPageScrolled(int arg0, float arg1, int arg2) {
              }
  
              @Override
              public void onPageScrollStateChanged(int arg0) {
              }
          });
      }
  
      @Override
      public void onTabReselected(Tab tab, FragmentTransaction ft) {
      }
  
      @Override
      public void onTabSelected(Tab tab, FragmentTransaction ft) {
          // on tab selected
          // show respected fragment view
          viewPager.setCurrentItem(tab.getPosition());
      }
  
      @Override
      public void onTabUnselected(Tab tab, FragmentTransaction ft) {
      }
  
  }
  </code></pre>
  
  <p>By this code , This is how the screen looks after compilation :</p>
  
  <p><img src="https://i.stack.imgur.com/m048Z.png" alt="enter image description here"></p>
  
  <p>How can I put tabs at the bottom of the screen ?</p>