Questions tagged [nine-patch]

A NinePatch is a stretchable bitmap image, which Android will automatically resize to accommodate the contents of the View in which you have placed it as the background. The four corners are unscaled; the four edges are scaled in one axis, and the middle is scaled in both axes.

704 questions
-1
votes
2 answers

Using 9-patch in android app

I've created my 9-patch images for my android buttons and have looked for (what would hardly be) tutorials on how to use them in the app (I'm using Android Studio btw), and I haven't been able to locate any decent explanation on how to do just that.…
lilgodwin
  • 1,098
  • 3
  • 13
  • 26
-1
votes
1 answer

List Item background stretched 9patch Android

Im trying to create a 9patch background in my listview items, but since I modified the images with 9patch the background is streched so I cannot see the whole image. Here is the image that I've modified: Here is my item.xml code:
-1
votes
1 answer

Android 9 Patch - 'bottom' area not showing?

Am running into something that I have spent hours trying to get working. I have tried searching but what stumbles me is how to search a resolution for this as it is a strange and apparently not-so-common issue? All I want is to be able to stretch a…
fantom
  • 31
  • 6
-1
votes
2 answers

Issue while using 9 patch

I have an app, that to chatting. I need to create bubbles. I did it with nine-Patch image but it was not useful because I need little triangle on right (left) of the bubble and when nine-Patch stretches the image the triangle also gets stretched.…
Agshin Huseynov
  • 170
  • 3
  • 13
-1
votes
1 answer

Button height different from background height in Android

As the title, in a button I set a resource in the background (a square image). The problem is that the button is now much higher than the classical buttons, how do I make it as high as the others? I tried with 9.patch but have the same…
Lele
  • 703
  • 3
  • 15
  • 34
-1
votes
1 answer

9-patch Android 4 issue, works Android 2.3

I created a 9-patch for a button "Day" in the images link below that works as expected on my Android 2.3 phone. When I run for Android 4 Tablet, it does not work. Not sure if I need to tweak the xml or issue in how the 9-patch is created. Also, I…
-1
votes
2 answers

nine patch images are working on iphone apps

i am making one of my iOS app an din that i want to use images that are Nine patch type so here my question is that is there iOS support the Nine patch images?
Ravi Vaghela
  • 31
  • 1
  • 10
-2
votes
1 answer

9-patch images not showing up

I just generated some 9 patch images with https://romannurik.github.io/AndroidAssetStudio/nine-patches.html This outputs some subfolders of drawable like drawable-hdpi, drawable-xhdpi, etc. I pasted them in the drawable folder and currently got…
David
  • 840
  • 6
  • 17
  • 37
-2
votes
1 answer

Is wrong nine patch image?

I brought two nine patch images from designer for action-bar list item background. But outside of item is black. I add images in "android:itemBackground". The below images have shadow effect. I think the image is wrong because it has margin. I…
inhogo
  • 253
  • 3
  • 9
-2
votes
2 answers

nine patch line is being shown

The nine patch line are being shown when I'm running it on the actual device. Previewing the xml file on eclipse works just fine, no black line on top and bottom of my image. However running in on actual device, the line is being shown. I've already…
lorraine batol
  • 6,001
  • 16
  • 55
  • 114
-3
votes
2 answers

Shall I put 9-Patch Image in different drawable for different screen size or i can place it only one time in drawable for different screen size?

I have one 9 patch image but i don't know that where i have to put it. only one time in Drawable folder or i have make different folder ( like mdpi,hdpi etc) in drawable for supporting different screen resolution.can anybody suggest me.thanks
Vikash Kumar
  • 395
  • 5
  • 17
-3
votes
1 answer

Chat bubbles makes to 9 patch images

Please help me for create 9-patch images for chat bubble. Actually I have made 9-patch images of chat bubbles but the problem is text not adjust inside the chat bubbles. so please help me find out this problem.Chat is new for me in android and this…
student
  • 27
  • 6
-3
votes
1 answer

9patch drawable or separate image in each drawable

Is it better to have separate image in each drawable folder (hdpi, ldpi, ...) or use 9patch drawable? I want to use 9patch drawable for different screen size but I am not sure which is better. I know that 9patch drawable is better because it we can…
baran
  • 17
  • 8
-4
votes
1 answer

Why this 9 patch splash screen is not working?

I'm under Delphi (I don't know if it matters) and I can't understand. I define my 9 patch splash screen like below (original size is 28*28px) : But when I run (on an xhdpi device) I get this (the background of the status bar is not aligned): This…
zeus
  • 12,173
  • 9
  • 63
  • 184
1 2 3
46
47