I have the following very basic layout for each row of a ListView. The two TextViews should be one on top of the other or in other words in two lines or such. However, I am seeing them in the same line or not seeing them at all. Also, sometimes I see that the rows height is very big. Can anyone tell me what’s the problem with my layout?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="100px" >
<ImageView
android:id="@+id/icon"
android:layout_width="60px"
android:layout_height="45px"
android:layout_marginLeft="4px"
android:layout_marginRight="4px"
android:layout_marginTop="4px"
android:src="@drawable/ahsan" >
</ImageView>
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="70px"
android:layout_y="60px"
android:text="@+id/TextView01"
android:textSize="18px" >
</TextView>
<TextView
android:id="@+id/label2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="70px"
android:layout_y="90px"
android:text="@+id/TextView02"
android:textSize="18px" >
</TextView>
</LinearLayout>
Try this code,