Just add transparent areas at the top and bottom of your progress image.
This way,  when it's scaled, it will appear shorter than the thumb.

7 мая, 2010 12:46 AM пользователь "cvance383" <[email protected]> написал:

Ok so I am getting a huge headache trying to do a pretty simple thing,
I want to create a seekbar with a custom look.

-I want create a custom progress drawable with 3 layers (background,
secondary progress, progress) from nine patch images I have already.
-I want to use a thumb w/ a custom image (that will be taller than the
progress height)

When I set the seekbar layout_height, the thumb fits perfectly but the
progress bar itself is too tall (It matches the thumb height). If I
set the seekbar height smaller, it chops the thumb. I have tried
setting the height in the progress drawable xml, but it doesnt seem to
respect that.

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android";
                                 android:height="15dip">
   <item android:id="@android:id/background"
       android:height="15dip"
       android:drawable="@drawable/progress_bg_test"/>

   <item android:id="@android:id/secondaryProgress"
              android:height="15dip"
               >
    <clip
    android:drawable="@drawable/progress_buffer"
   />
   </item>

   <item android:id="@android:id/progress"
              android:height="15dip">
        <clip android:drawable="@drawable/progress"/>
   </item>
</layer-list>

But it still draws the progress the same size of the thumb. I have
searched this forum and google relentlessly but no solution. Any help
will be majorly appreciated.

--
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]<android-developers%[email protected]>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
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