I'm pretty new to Android development and would love some help creating a simple layout on android. This layout will be used in a listview.
This is the look I'm going for:
This is what I get (don't laugh):
The bottom row of text is overlapping the top, the number should be on the right (just left of the image) and the images in different rows should align.
(And yes, I know the colors are ugly.)
Here's my xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/thelayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="6dip"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:id="@+id/widget375"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="5">
<TextView
android:id="@+id/txt2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14pt"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/txt1" />
<TextView
android:id="@+id/txt3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/txt1"
android:layout_alignParentLeft="true" />
<TextView
android:id="@+id/txt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14pt"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" />
</RelativeLayout>
<ImageView
android:id="@+id/theicon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
Thanks!