title: Rounded corners for TABS in android
body: <p>I want to achieve rounded corners for the tab that I've constructed in my application. So far I was able to come up with this<img src="https://i.stack.imgur.com/fxZp8.jpg" alt="enter image description here"></p>
  
  <p>I would like my rounded corners to look as so. (I've coded it in such a way that only the right and left corners appear but when the states change it looks like the above image)
  <img src="https://i.stack.imgur.com/OLVFb.jpg" alt="enter image description here"></p>
  
  <p>Below is the code that I've written so far. How can I achieve proper rounded corners  through code ?</p>
  
  <p>SELECTED TAB.XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="rectangle"
  &gt;
  &lt;corners
      android:topRightRadius="10dp"
      android:bottomLeftRadius="10dp"/&gt;
  
  &lt;gradient
      android:startColor="#000" 
      android:endColor="#000"
      android:gradientRadius="400"
      android:angle="-270"/&gt;
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>UNSELECTED TAB.XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
  android:shape="rectangle"
  &gt;
  &lt;gradient 
  android:angle="90" 
  android:startColor="#880f0f10" 
  android:centerColor="#8858585a" 
  android:endColor="#88a9a9a9"/&gt;
  
   &lt;corners
      android:topLeftRadius="10dp"
      android:bottomRightRadius="10dp"/&gt;
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>Thanks for your response !!  :)</p>