I started with Fedor ListView . Here is the XML for my ListView element:
<?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="wrap_content"> <ImageView android:id="@+id/image" android:layout_width="50dip" android:layout_height="50dip" android:src="@drawable/stub" android:scaleType="centerCrop"/> <TextView android:id="@+id/name" android:layout_width="0px" android:layout_height="0px" android:layout_weight="0" android:textSize="20dip" android:layout_marginLeft="10dip"/> <TextView android:id="@+id/address" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:textSize="16dip" android:layout_marginLeft="10dip"/> </LinearLayout>
What I see on my device is ImageView and two TextViews displayed sequentially from left to right.
What I want is an ImageView all the way to the right (this is already correct), the name of the TextView to the right of the image (this is correct) and the address of the TextView, BELOW is the name of the TextView. I could not figure out how to do it right.
Please note: I know that I can just add a new line to the name and include the address text after that, but I want these two elements to have different font sizes, so this is not an option. Thank you very much!
source share