The seek bar is not a slide to unlock UI.  Honestly, write your own custom
view for this.

On Sat, Feb 26, 2011 at 10:38 AM, nkijak <[email protected]> wrote:

> I'm trying to build a seek bar with text in/"under" it to make
> something akin to the "slide to unlock" bar on the iPhone.  I figured
> I'd change the style of the seek bar and added:
> <layer-list>
> ...
> <item android:id="@android:id/background">
>        <layer-list>
>                <item>
>                        <shape>
>                            <corners android:radius="10dip" />
>                            <gradient
>                                    android:startColor="#88747674"
>                                    android:centerColor="#885a5d5a"
>                                    android:centerY="0.25"
>                                    android:endColor="#889d9e9d"
>                                    android:angle="270"
>                            />
>                        </shape>
>                </item>
>                <item>
>                        <bitmap
> android:src="@drawable/slide_to_finish_label"
> android:gravity="fill_horizontal"/>
>                </item>
>        </layer-list>
>    </item>
> ...
> </layer-list>
>
> slide_to_finish_label is a 9-patch PNG.  The default tile mode is
> listed as none.  When I use this nested layer-list as the background
> of my app it works as I expect.  My bitmap shows up stretched side to
> side but not up and down.  When I use this as the style for the seek
> bar the bitmap shows up not stretched and repeating.
>
> Changing the gravity attribute has no affect on the repeating.  I
> thought it might have something to do with the nesting of the layer
> list, like that the item in the parent-list is being repeated.  The
> guide on Drawable Resources seemingly warns on this issue and suggests
> using a bitmap to control stretching and repeating but even when I
> reduce the item to just a bitmap (not a nested layer-list) gravity
> still has no affect.
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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