Sunday, 15 May 2011

how to use a color in horizontal progress bar ?

Create a one folder name as Drawable and create another xml in that folder

<layer-list xmlns:android="">
 <item android:id="@android:id/background">
   <corners android:radius="25dip" />
   <gradient android:startColor="#000000" android:endColor="#000000" />
   <stroke android:width="1dp" android:color="#000000" />

 <item android:id="@android:id/progress">
    <corners android:radius="35dip" />
    <gradient android:startColor="#990000" android:endColor="#E6E8FA" />
     <stroke android:width="1dp" android:color="#6B8E23" />

this xml files can show the loading progress bar in a color.


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=""
    android:layout_height="fill_parent" android:orientation="vertical">
    <ProgressBar android:layout_marginLeft="5dp" android:layout_width="250dp" android:progressDrawable="@drawable/myprogressbar" android:id="@+id/progressBar1" android:layout_marginBottom="90dp" android:layout_marginRight="10dp" style="?android:attr/progressBarStyleHorizontal" android:layout_height="wrap_content"></ProgressBar>


  1. It's interesting that many of the bloggers your tips helped to clarify a few things for me as well as giving... very specific nice content.Best Android Training in Velachery | android development course fees in chennai

  2. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this development course fees in chennai | android app development training in chennai