i want to draw a custom progress, and I googled around and came up
with this --

in res/drawable, I have the following xml

<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/
android">
     <item android:id="@+android:id/background"
           android:drawable="@drawable/progress_background"/>
     <item android:id="@+android:id/SecondaryProgress"
           android:drawable="@drawable/progress_background"/>
     <item android:id="@+android:id/progress"
           android:drawable="@drawable/progress"/>
</layer-list>

then to use it, in my main xml, I have --

<ProgressBar android:id="@+id/ProgressBar"
                     style="?android:attr/progressBarStyleHorizontal"
                     android:progressDrawable="@drawable/progress_bar"
                     android:layout_width="fill_parent"
                     android:secondaryProgress="100"
                     android:progress="50"
                     android:max="100"
                     android:layout_height="wrap_content"/>

My question is, what should "progress_background.png" and
"progress.png" look like in terms of dimensions?

Do they need to have the same height?  Same width?  How does it draw
the progress at an arbitrary percentage?

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

Reply via email to