I have defined an XML to show a little popUp window:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical" >
<ScrollView
android:id="@+id/scroller"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dip"
android:background="@drawable/marker_popup_border"
android:clickable="true"
android:fadingEdgeLength="5dip"
android:scrollbars="none" >
<LinearLayout
android:id="@+id/tracks"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal|center_vertical"
android:orientation="horizontal"
android:padding="10dip" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingRight="10dp" >
<TextView
android:id="@+id/popUpName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center" >
<TextView
android:id="@+id/popUpState"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="5dp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/graylightmore" >
</LinearLayout>
<ImageView
android:id="@+id/imageView1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:contentDescription="@string/info"
android:paddingLeft="5dp"
android:src="@drawable/info" />
</LinearLayout>
</ScrollView>
<ImageView
android:id="@+id/arrow_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="-4dip"
android:contentDescription="@string/empty"
android:src="@drawable/arrow_down_black" />
When one of the two Textviews requires a lot of space, the info-image gets squeezed…you can see the result on this link. I’d need a hint in order that the i is always displayed and the textviews are devided into 2 rows if needed.
Try giving layout_weight property as below: