Android ListView row not visible
I am trying to make a ListView row that has an icon to the left, followed
by two stacked rows to the right. However, for some reason the bottom row
on the right is not showing up. My question to the StackOverflow experts
is: what is incorrect in my XML to make the bottom row not show up?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="6dip" >
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="6dip"
android:src="@drawable/ap" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="40dip" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="20dip" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="20dip" >
<TextView
android:id="@+id/bssid"
android:layout_width="140dip"
android:layout_height="20dip"
android:gravity="center_vertical|left"
android:textColor="@color/foreground" />
<TextView
android:id="@+id/ssid"
android:layout_width="190dip"
android:layout_height="20dip"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/bssid"
android:gravity="center_vertical|right"
android:textColor="@color/foreground" />
<TextView
android:id="@+id/enc"
android:layout_width="100dip"
android:layout_height="20dip"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/ssid"
android:gravity="center_vertical|right"
android:textColor="@color/foreground" />
<TextView
android:id="@+id/power"
android:layout_width="70dip"
android:layout_height="20dip"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/enc"
android:gravity="center_vertical|right"
android:textColor="@color/foreground" />
</RelativeLayout>
<RelativeLayout
android:layout_height="20dip"
android:layout_width="match_parent" >
<TextView
android:id="@+id/mgmt"
android:layout_width="55dip"
android:layout_height="20dip"
android:gravity="center_vertical|right"
android:textColor="@color/foreground" />
<TextView
android:id="@+id/data"
android:layout_width="55dip"
android:layout_height="20dip"
android:layout_toRightOf="@id/mgmt"
android:gravity="center_vertical|right"
android:textColor="@color/foreground" />
<TextView
android:id="@+id/manuf"
android:layout_width="200dip"
android:layout_height="20dip"
android:layout_toRightOf="@id/data"
android:gravity="center_vertical|right"
android:textColor="@color/foreground" />
<TextView
android:id="@+id/lastseen"
android:layout_width="140dip"
android:layout_height="20dip"
android:layout_toRightOf="@id/manuf"
android:gravity="center_vertical|right"
android:textColor="@color/foreground" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
Also, if you have a better idea or way to do this, I am certainly open to
it. Thank you for your help.
No comments:
Post a Comment