title: Progress bar rounded on both sides in android
body: <p>I am trying to create a custom progress bar in android. I have used the following xml file for it (progress_bar_horizontal.xml):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item android:id="@android:id/background"&gt;
     &lt;shape&gt;
      &lt;corners android:radius="8dip" /&gt;
      &lt;stroke android:width="2dip" android:color="#FFFF"/&gt;
      &lt;solid android:color="#FFFF"/&gt;              
     &lt;/shape&gt;
    &lt;/item&gt;
    &lt;item android:id="@android:id/secondaryProgress"&gt;
     &lt;clip&gt;
      &lt;shape&gt;
       &lt;corners android:radius="8dip" /&gt;
       &lt;stroke android:width="2dip" android:color="#FFFF"/&gt;
       &lt;solid android:color="#FF00"/&gt; 
      &lt;/shape&gt;
     &lt;/clip&gt;
    &lt;/item&gt;
    &lt;item android:id="@android:id/progress"&gt;
     &lt;clip&gt;
      &lt;shape&gt;
       &lt;corners android:radius="8dip" /&gt;
       &lt;stroke android:width="2dip" android:color="#FFFF"/&gt;
       &lt;solid android:color="#FF00"/&gt; 
      &lt;/shape&gt;
     &lt;/clip&gt;
    &lt;/item&gt;
   &lt;/layer-list&gt;
  </code></pre>
  
  <p>Everything works great apart from the fact I would like to have the progress in my progress bar rounded on both sides. The aforementioned code makes a progress bar to be rounded on the left hand side and simply cut (not rounded) on the right hand side. It is because of the clip tag probably. Could you please help me on that? What should i change to have the progress in my progress bar rounded on both sides? </p>
  
  <p>The full layout goes below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"&gt;
    &lt;LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:background="@drawable/gradient_progress"
    android:padding="10dip"
    &gt;
     &lt;LinearLayout
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:orientation="horizontal"
     &gt;
      &lt;TextView
       android:id="@+id/progress_header"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:textColor="#FF000000"
       android:textAppearance="?android:attr/textAppearanceMedium"
       android:textStyle="bold"
       android:text="Uploading"               
      /&gt;
      &lt;TextView
       android:id="@+id/progress_percent"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:textColor="#FF000000"
       android:textAppearance="?android:attr/textAppearanceMedium"
       android:textStyle="bold"
       android:text="55%"         
       android:paddingLeft="10dip"
      /&gt;      
     &lt;/LinearLayout&gt;          
     &lt;ProgressBar
      android:id="@+id/progress_bar"
      style="?android:attr/progressBarStyleHorizontal"
      android:layout_gravity="center"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:progressDrawable="@drawable/progress_bar_horizontal"
      android:maxHeight="12dip"    
      android:minHeight="12dip"    
      android:max="100" 
     /&gt;
    &lt;/LinearLayout&gt;
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is the result of my effort: <a href="http://stud.ics.p.lodz.pl/~youri/progress.jpg" rel="noreferrer">link text</a></p>
  
  <p>I would like the red bar to have rounded edges on the right hand side as well.
  Thank you so much for your comments.</p>