In a ListView, I am trying to display some text on the left and a
number on the right.  I got it working with a RelativeView, but if the
text on the left is too long, my number doesn't appear?

http://www.elubin.com/images/Capture.jpg

Here is my layout:
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android";
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:padding="6dip">
        <TextView android:id="@+id/text1"
            android:textSize="18sp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="left" />

        <TextView android:id="@+id/text2"
            android:textSize="18sp"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@+id/text1"
            android:gravity="right"  />
</RelativeLayout>
</LinearLayout>

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

Reply via email to