Alok,

Found this discussion about creating nine-patches programmatically. Hope this is useful.

http://www.mail-archive.com/android-developers@googlegroups.com/msg26977.html

-- Kostya

Alok Kulkarni <kulsu...@gmail.com> писал(а) в своём письме Wed, 05 May 2010 17:06:32 +0400:

Kostya, even the spinner didnt work as expected.. Its image too got
expanded.Though i gave it to a button.
I have attached screen shots 1st one has 2 images left one is larger text
and right one is smaller text
The white border on the left and right hand side of the button is expanding
for larger text which is what i dont want ...
The 2nd image is the spinner image

On Wed, May 5, 2010 at 5:51 PM, Alok Kulkarni <kulsu...@gmail.com> wrote:

Does not make any difference between both ir CreateFromStream and
CreateFromPath
Apparantly i am having a problem creatnig the image in the Draw9 patch..
I have attached the screen shot.
I can see that the corners are getting stretched even when i have specified
stretching at the centre..
Help please :):)


On Wed, May 5, 2010 at 4:49 PM, skink <psk...@gmail.com> wrote:



On May 5, 8:48 am, Alok Kulkarni <kulsu...@gmail.com> wrote:
> Okay i have a question here ..
> I am trying to use the draw9patch tool in the sdk folder. I took an
image
> btn_media_player.9 from the SDK folder path which skink had given
> In the code i did the following
>         String path =
>
"data/data/com.android.test.themes/default/images/btn_media_player.9.png";
>         Drawable npd =  NinePatchDrawable.createFromPath(path);
>         btn.setBackgroundDrawable(npd);
> But this is not working.. The image is getting stretched.I have attached
the
> screenshot. Am i doing anything wrong ?
>

try createFromStream

pskink

--
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<android-developers%2bunsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en






--
Kostya Vasilyev - WiFi Manager + pretty widget - http://kmansoft.wordpress.com/sw

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