[android-developers] Re: NinePatchDrawable constructor

2016-06-03 Thread kishore
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

[android-developers] Re: NinePatchDrawable constructor

2009-03-11 Thread Romain Guy (Google)
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): *** *** *** *** *** *** *

[android-developers] Re: NinePatchDrawable constructor

2009-03-09 Thread Ron
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

[android-developers] Re: NinePatchDrawable constructor

2009-03-07 Thread Romain Guy
> 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

[android-developers] Re: NinePatchDrawable constructor

2009-03-07 Thread Ron
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

[android-developers] Re: NinePatchDrawable constructor

2009-03-02 Thread Romain Guy
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

[android-developers] Re: NinePatchDrawable constructor

2009-03-02 Thread Dianne Hackborn
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