I am also trying to create a 9 patch png from a standard png.
I am new to this, so I do not know how to create it programmatically.
I read about it, but there is no proper documentation about.
1. 9 patch chunk - What is it?
2. Cap inset - What is it?
3. How to get the 1 px stretchable area patch a
I can't help you with native crashes unfortunately :(
On Mar 9, 10:36 am, Ron wrote:
> Sorry, the last time I posted I couldn't figure out how to get the
> logcat text... then I found it was relatively simple. Here is the
> dump:
>
> 03-09 12:29:05.734: INFO/DEBUG(28): *** *** *** *** *** *** *
Sorry, the last time I posted I couldn't figure out how to get the
logcat text... then I found it was relatively simple. Here is the
dump:
03-09 12:29:05.734: INFO/DEBUG(28): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
03-09 12:29:05.734: INFO/DEBUG(28): Build fingerprint: 'a
> Everything runs ok until the constructor for NinePatch(bitmap, chunk,
> src) causes the app to crash... no stacktrace, but a ton of internal
> debug diagnostics are sent to logcat... none of which makes any sense
> to me nor points to the problem.
It necessarily does. And without seeing the log
Does this work? I took a 9patch png that works fine if I use it via
setBackgroundResource(), but instead loaded the png bytes and decoded
them via BitmapFactory to get a Bitmap and used the getNinePatchChunk
() method in an attempt to create a NinePatch object from the bitmap.
Everything runs ok
The nine patch chunk can be returned by the Bitmap class. Load a
Bitmap with BitmapFactory, then call getNinePatchChunk() to get the
chunks. The padding is a bit more complicated. You need to first
create a Rect and pass that Rect to the approprite
BitmapFactor.decode*() method. While decoding the
This isn't really intended to be used much by apps. The byte[] is the raw
data of the PNG 9-patch extension chunk that we defined for android, which
aapt generates; you'll have to build that all yourself, and look at the
ResourceTypes.h header file for a description of its contents. The padding
i
7 matches
Mail list logo