Q:

How to position widgets in a custom way

In my android app i show a custom dialog. In this dialog i have an icon to be showed to the left, a text to be showed adjacent to the icon (horizontally) and a listview to be showed at the bottom. I can't get this setting the dialog layout horizontal or vertical.
How can i do?
Thx

A:

Use two LinearLayouts. The first should be vertical.
In this one, there should be two items. First another LinearLayout that is horizontal with the Icon and the Text in it. And the other item in the vertical Layout should be the ListView.
Something like that:
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical">
    <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
        <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="whatever"/>
        <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="whatever"/>
    </LinearLayout>
    <ListView  android:layout_width="fill_parent" android:layout_height="wrap_content" />
</LinearLayout>`

Hope this helped

