Hi I have a list view structure, with Relative layout that uses
alternating background images for odd/even elements. I'm trying to set
the background drawable dynamically by calculating the position. It
worked fine with the normal bitmap. But when I tried to use the
ninepatch image it breaks the UI, all the elements get distorted. What
as I doing wrong? Could it be how the ninepatch image is created or is
there a different way to use a nicepatch image compared to a normal
bitmap.

My List View XML goes like 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>

                <TextView  />

                <TextView  />

                <TextView  />

        </RelativeLayout>

</RelativeLayout>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to