nine-patch

Is there a nine-patch loader for iPhone?

Android has a nice way of defining stretchable images called a nine-patch. See these docs for a description of the concept. The idea is to surround a png image with a 1-pixel border where you can define the stretchable areas and the padding dimensions of the image. This is absolutely brilliant and I'd like to use the idea in my iPhone...

Drawing Nine Patch onto Canvas (Android)

Hello I'm trying to draw a nine patch onto a Canvas object on the Android. What seems strange is that although I generated my nine patch using the draw9patch tool, the constructor for NinePatch requires an additional byte array called the "chunk" to construct the nine patch. Why isn't this simpler? What is the "chunk"? And if you have ...

Is there a tool to allow the use of Android's 9-patches in Javascript?

I'd like a Javascript library that will stretch/scale 9-patch images correctly. Know of one? ...

How do I go about including the Tortuga 22 NinePatch library to my XCode project?

Hello CocoaTouch experts! First of all, there is finally NinePatch support for the iPhone, BIG thanks to the Tortuga 22 team for that. Unfortunately for me I have not been able to add their library to my project. What is NinePatch? The Tortuga 22 blog post. The source code at git hub. If I just drag and drop the source-files into my...

android 9 patch drawable xml

Is there a way to define a 9 patch drawable in an android xml file? The reason I ask, is that when you apply a scale animation to a drawable w/ a stroke on it, the stroke appears to thicken. I'd like to make the stroke stay the same size as the animation plays... ...

9 patch row background appears irregularly in Android

I'm using the following 9 patch image as the row background in a list view. (the image is right above this line, in case you missed it) I've placed this image in drawable-hdpi. When I run the app in a high density device, the grey border appears only while scrolling, and disappears when the list view is still. Why is this? The goal ...

9-patch bitmap on a widget using RemoteViews

I have a widget with an ImageView on it. I set this ImageView to a Bitmap created from a 9-patch PNG resource. The image is set correctly but is not stretched correctly - i.e. the whole image is stretched instead of just part like defined in my 9-patch PNG. If I just set the 9-patch image as a resource, it works. How can I fix this? // ...

Android: 9-patch repeat pattern instead of stretching

I have a 9-patch image file which looks like this: When I use it it appears like this: What I actually wanted to achieve is the complete dot in the center repeated instead of stretched. I hope that it's possible. ...

Android: Not more than 1 nine patch image at a time?!

Hi, I am having problems with nine patch images ( **.9.png ). I have a widget layout and would like to use nine patch images for the widget's backgroud. Here is my background.xml <selector xmlns:android="http://schemas.android.com/apk/res/android"&gt; <item android:state_focused="true" android:state_pressed="true" android:drawable=...

Android / Styling a Button: Background also behind Drawable left and Drawable right

I am styling a Button whose width can change in the program through different Content. I got the png files from the designer like this: [Left Border] [Background (just a strip with the gradient)] [Right Border] I thought I'm fine with assigning the Properties of the Button like this: Background: Background.png Drawable left: LeftBor...

Android / 9-patch PNG: What, if I need smth like a 11-patch PNG?

In Draw 9-patch, everything looks fine. However, my SDK says the 9-patch png is malformed. Because I have something like an 11-patch png. Because I don't want the little grabbing area to be scaled. How to get it working? The screenshot describes everything: Error Meassage in Console: ERROR: 9-patch image /res/drawable-hdpi/top_comple...

[Android] How to cover a 9-PATCH-PNG entirely?

I try to implement a hover effect (effect when button is pressed) through putting a semi transparent PNG file on top of the button background and the button icon. Unfortunatly the button background file is a 9-PATCH-PNG which causes some trouble here: It "swallows" everything on top of its layer and doesnt allow to cover the stretchable ...

How to create nine patch png image in android ?

Hi , I have an image with a fixed size , ex. 300 x 300 ; it was a background image of my view. But my view size was dynamic , so i need an image which can stretch , according to desired size. can any one tell me how to make it ? I know we have to use nine oatch drawable ? i dont know how to tool given with android sdk ? can any one te...