How to specify a LinearLayout to either wrap_content if it exceeds certain width
- by michael
Hi,
I have want to layout an ImageView and then follow by a LinearLayout (to the right of it).
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView android:id="@+id/icon" android:layout_width="20px"
android:layout_height="20px" />
<RelativeLayout android:id="@+id/side" android:layout_width="fill_parent" android:layout_weight="1" android:layout_width="????">
// some children here
</RelativeLayout>
</LinearLayout>
How can I configure my side panel so that it either use 'wrap_content' if the height is than the image view? if not, use the height of the image i.e. 20px?