[android-developers] Re: nine patch details
Hmmm…
Ok, the docs say this:
"The bottom and right lines define the relative area within the image that the contents of the View are allowed to lie within."
Hmmmm… This confused me earlier, but I think I get it. So, if you have a button with text, the text will be placed in the area defined by the bottom and right lines?
Also, in case it helps anyone, remember 9 patches can't be downscaled. This confused me so much. I couldn't figure out why my buttons were so big.
On Thursday, June 28, 2012 1:36:22 PM UTC-5, RichardC wrote:
http://developer.android.com/--guide/topics/graphics/2d- graphics.html#nine-patch
On Thursday, June 28, 2012 7:33:47 PM UTC+1, bob wrote:Can someone help me understand exactly what Android considers a nine patch?
I'm thinking of making my own nine-patch utility. I know there is draw9patch.bat, but I think there could be something better.
Here is my guess. To make a nine-patch, you take an image and give it a 1-pixel border. Then, on the right, there's a black vertical line along the height (but not counting the curves). On the bottom there's the same thing but horizontal. On the left, there is a dot in the center. On the top, dot in the center. And, by black, I mean r=0 g=0, b=0, a=255.
Does this sound right?
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home