Thanks a lot Kostya for those links..You and Skink have attended to my
problems patiently throughout the day :)
I tried the following
Bitmap bmp =
BitmapFactory.decodeFile("data/data/com.android.test.themes/fin2.9.png");
        byte[] bmpChunks = bmp.getNinePatchChunk();
        NinePatchDrawable npd2 = new NinePatchDrawable(bmp, bmpChunks,
npd.getBounds(), "fin2.9.png");
i didnt know what to give as the 3rd and 4th parameter to NinePatchDrawable
construcor so the third parameter ie Rect was a rectangle returned by the
same button drawable object which was created earlier.
My bitmap object bmp is getting created but the getNinePatchChunk() method
is returning null.
The doc for this function itself says :- "Returns an optional array of
private data, used by the UI system for some bitmaps. Not intended to be
called by applications. "
So apparantly i am not getting a solution to this problem.. Is there any
other way out .. :( :(
Thanks,
Alok

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

>
>
> On May 5, 11:30 am, "Kostya Vasilyev" <kmans...@gmail.com> wrote:
> > Alok,
> >
> > Found this discussion about creating nine-patches programmatically. Hope
>
> > this is useful.
> >
>
>
> also NinePatchDrawable sources will be useful, see inflate() method
>
>
> http://www.netmite.com/android/mydroid/donut/frameworks/base/graphics/java/android/graphics/drawable/NinePatchDrawable.java
>
> 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
>

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