title: How to change background color of action bar without increasing min sdk?
body: <p>As we know, a colored background of action bar permitted in sdk level 11, watch <a href="https://stackoverflow.com/questions/8024706/how-do-i-change-the-background-color-of-the-actionbar-of-an-actionbaractivity-us?rq=1">this</a>. But there are some applications with colored action bar that have min sdk lower than 11. For example Whatsapp has green action bar but has min sdk:7 <a href="https://www.whatsapp.com/faq/en/android/21166563" rel="nofollow">WhatsApp FAQ</a>, or the Telegram application has min sdk:8 <a href="https://telegram.org/faq#q-which-devices-can-i-use" rel="nofollow">Telegram FAQ</a>, but has blue action bar. </p>
  
  <p>How these applications work? And how I can do this?</p>
  
  <pre><code>android.app.ActionBar actionBar = (android.app.ActionBar) getActionBar();
  actionBar.setDisplayShowHomeEnabled(false);
  View mActionBarView = getLayoutInflater().inflate(R.layout.action_bar_main, null);
  actionBar.setCustomView(mActionBarView);
  actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
  </code></pre>
  
  <p>This code requires minSdk = 11, for <code>getActionBar()</code>. Please help me.</p>