It would be great if you could help me giving an example of using the
inflate method and the NinePatchDrawable constructor.
Thanks,
Alok.

2010/5/5 Alok Kulkarni <kulsu...@gmail.com>

> Yes i had created the image fin2.9.png using draw9patch tool.Frankly
> speaking i am not getting how to use the second method :) Its going like a
> bouncer to me :)
> Thanks a lot,
> Alok
>
> 2010/5/5 Kostya Vasilyev <kmans...@gmail.com>
>
>> Are you using a NinePatch file  (fin2.9.png) created with Android's
>> draw9patch tool? If not, you should be, as a test. The docs say that the
>> ninepatch chunk is stored as a chunk in the 9.png file itself - the lines
>> along the edges of the image are just there for convenience.
>>
>>
>> If that doesn't help, maybe you could try one of the other method for
>> loading the bitmap.
>>
>> -- Kostya
>>
>> Alok Kulkarni <kulsu...@gmail.com> писал(а) в своём письме Wed, 05 May
>> 2010 19:35:40 +0400:
>>
>>  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>
>>>> <android-developers%2bunsubscr...@googlegroups.com<android-developers%252bunsubscr...@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<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