http://developer.android.com/reference/android/graphics/drawable/BitmapDrawable.html

http://developer.android.com/reference/android/graphics/drawable/NinePatchDrawable.html

Note that nine-patches are a bit tricky because you are going to have to
manually construct a byte array holding the PNG chunk for the nine-patch
data that Android defines.  The definition of it is here:

http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=include/utils/ResourceTypes.h
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=libs/utils/ResourceTypes.cpp

On Thu, Apr 2, 2009 at 10:52 AM, guruk <[email protected]> wrote:

>
> I have an array of buttons. (calendar)
>
> now i know i set the background with a drawable. fine.
>
> but HOW can i create a image (best a nine png (so its stretchable)
> lets say with 3 rows each a different color)
>
> and finaly set it as a drawable??
>
> a short demo would be great
>
> 1. create simple image (3 rows with different color)
> 2. assign this image to a button
>
> thanks
> >
>


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