title: How to set the background color of navigation tab in android
body: <p>How to set the background color of navigation tab in android with this kind of code. ` </p>
  
  <pre><code>            ActionBar bar = getSupportActionBar();
              bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
  
              ActionBar.Tab tab1 = bar.newTab();
              ActionBar.Tab tab2 = bar.newTab();
              tab1.setText("Fragment A");
              tab2.setText("Fragment B");
              tab1.setTabListener(new MyTabListener());
              tab2.setTabListener(new MyTabListener());
              bar.addTab(tab1);
              bar.addTab(tab2);`
  </code></pre>
  
  <p>i did not create a tab in xml. i was just wondering if its possible in this kind of code. thank you. </p>