1

I have a 9 patch image, here it is 9 patch image

now, I'm using it as a background image for a Relative Layout like this

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/ae_bubble">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="8dp"
        android:text="How satisfied are you in terms of Aeroman performance regarding: TAT, quality of the work performed and aircraft appearance?"/>

</RelativeLayout>

This give me the next result in android studio preview using a nexus 5 preview, perfect in the center

android studio preview

but when I run it in a nexus 5 emulator the tip of the arrow is not centered, same for the real nexus 5 device

enter image description here

I have tried this on another device like a moto g emulator and the real moto g device and the tip is perfect in the center, what can be wrong on the image bubble that is affecting only nexus 5?, also is weird that the nexus 5 preview on android studio is centered, what can I do?, thanks for any help

FIX This is the final image that worked

enter image description here

goseta
  • 770
  • 1
  • 7
  • 26
  • Try the "Draw 9-patch" tool and see if it shows any error. http://developer.android.com/tools/help/draw9patch.html – Gusman Apr 29 '15 at 01:20
  • I had checked for errors, and there is no bad patches reported – goseta Apr 29 '15 at 01:36
  • 1
    Related to [9 patch image incorrectly streeched in xhdpi density](http://stackoverflow.com/questions/22158213/9-patch-image-incorrectly-streeched-in-xhdpi-density) – Richard Le Mesurier Jan 13 '16 at 13:41

1 Answers1

1

Just checked your image and you should change the two dots place. Right now they are in the same postion with the last pixels of the bottom line. Try move them one pixel other for each side.

Onur Topal
  • 3,042
  • 1
  • 24
  • 41
  • hi, thanks for the reply to all, yes just tried your suggestion and now the tip move to the other side :) https://www.dropbox.com/s/1o7xxr0qoqwa7do/Screen%20Shot%202015-04-28%20at%207.38.36%20PM.png?dl=0 here is the screenshot sorry https://www.dropbox.com/s/5173ozzl05lvk20/device-2015-04-28-194113.png?dl=0 – goseta Apr 29 '15 at 01:40
  • Hey got it worked, you suggestion force me to tweak and tweak, at the end I moved the top pixeles one pixels away from their respecting place and made the the bottom pixel one pixels smaller on each side and whoala! I will edit my question to put the final image thanks a lot – goseta Apr 29 '15 at 01:49