> hi i am new to android .
> i want to change the color of progress of seekbar form orange that is
> default ot something different.
>
> i tried something like this:
> here is my code
>
> <?xml version="1.0" encoding="utf-8"?>
> <layer-list xmlns:android="http://schemas.android.com/apk/res/
> android">
>   <item android:id="@android:id/background">
>        <shape>
>            <corners android:radius="5dip" />
>              <gradient
>               android:startColor="#ff9d9e9d"
>                        android:centerColor="#ff5a5d5a"
>              android:centerY="0.75"
>              android:endColor="#ff747674"
>                android:angle="270"
>             />
>     </shape>
>  </item>
>     <item android:id="@android:id/progress">
>          <clip>
>              <shape>
>                 <corners android:radius="5dip" />
>                       <gradient
>                          android:startColor="#ffffd300"
>                           android:centerColor="#ffffb600"
>                          android:centerY="0.75"
>                          android:endColor="#ffffcb00"
>                           android:angle="270"
>                  />
>               </shape>
>           </clip>
>      </item>
>  </layer-list>
>
>  <SeekBar android:id="@+id/seek"
>         android:layout_width="400dip"
>               android:progressDrawable="@drawable/progress_horizontal"
>         android:layout_height="wrap_content"
>         android:layout_below="@+id/btngrid"
>         android:layout_marginTop = "10dip"
>         android:layout_marginLeft = "30dip"
>         android:max="10"
>         android:progress="1"
>         />
>
> but it did nothing .so anybody can help me on this problem
> plz its urgent.

I recently used this same sort of technique for changing the colors in a
ProgressBar. The three differences I see between what you did and what I
did:

-- You are using SeekBar instead of ProgressBar, and it is possible
SeekBar handles the progress drawable differently

-- ProgressBar needs a third item with an id of @android:id/secondaryProgress

-- I called setProgressDrawable() in Java code rather than using an XML
attribute

Otherwise, I do not see any obvious differences in technique.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to