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 ?


On Wed, May 5, 2010 at 3:52 PM, skink <[email protected]> wrote:

>
>
> On May 5, 6:46 am, Alok Kulkarni <[email protected]> wrote:
> > Can you show me an example if possible ?
>
> use this ctor:
>
>
> http://developer.android.com/intl/fr/reference/android/graphics/drawable/NinePatchDrawable.html#NinePatchDrawable(android.content.res.Resources<http://developer.android.com/intl/fr/reference/android/graphics/drawable/NinePatchDrawable.html#NinePatchDrawable%28android.content.res.Resources>
> ,
> android.graphics.Bitmap, byte[], android.graphics.Rect,
> java.lang.String)
>
> pskink
>
> --
> 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

<<attachment: 9 patched.JPG>>

Reply via email to