android - Problem with 9 patch image as background -


i have list view structure, relative layout uses alternating background images odd/even elements. i'm trying set background drawable dynamically calculating position. worked fine normal bitmap. when tried use ninepatch image breaks ui, elements distorted. doing wrong? how ninepatch image created or there different way use ninepatch image compared normal bitmap.

my list view xml goes this

<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android"        android:layout_width="fill_parent"        android:layout_height="wrap_content" android:id="@+id/id01"        android:background="@drawable/my_9patch_bg_image">        <imageview  />        <relativelayout>          <imageview  />           <textview  />           <textview  />        </relativelayout> </relativelayout> 

may solution here might work problem. it's exact though have try it.

since nobody answered year now... had same issue need setpadding of 0 (even if don't need it).

good luck.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -