View

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
res/drawable/myprogressbar.xml

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

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


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

main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    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>
</LinearLayout>



13 comments:

  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

    ReplyDelete
  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 topic.android development course fees in chennai | android app development training in chennai

    ReplyDelete
  3. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.

    Data Science Training in Chennai
    Data science training in bangalore
    Data science online training
    Data science training in pune
    Data science training in kalyan nagar
    selenium training in chennai

    ReplyDelete
  4. Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us

    Data Science training in marathahalli
    Data Science training in btm
    Data Science training in rajaji nagar
    Data Science training in chennai
    Data Science training in kalyan nagar
    Data Science training in electronic city
    Data Science training in USA
    Data science training in pune



    ReplyDelete
  5. This is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb. This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolite festivity to pity. I appreciated what you ok extremely here.

    java training in chennai | java training in bangalore

    java online training | java training in pune

    java training in chennai | java training in bangalore

    ReplyDelete
  6. Just stumbled across your blog and was instantly amazed with all the useful information that is on it. Great post, just what i was looking for and i am looking forward to reading your other posts soon!
    python training institute in chennai
    python training in velachery
    python training institute in chennai

    ReplyDelete
  7. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 
    Devops Training in Chennai

    Devops Training in Bangalore

    Devops Training in pune

    ReplyDelete
  8. Awesome..You have clearly explained …Its very useful for me to know about new things..Keep on blogging..
    Blueprism training in Chennai

    Blueprism training in Bangalore

    Blueprism training in Pune

    ReplyDelete
  9. Woah this blog is wonderful i like studying your posts. Keep up the great work! You understand, lots of persons are hunting around for this info, you could help them greatly.

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs Training in btm

    angularjs Training in electronic-city

    angularjs online Training

    ReplyDelete