How can I have a ListView mount the items as follows:
When you have only one item it occupies the entire screen, if you have two, divide the screen size by 50% between items and so on ...
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ListViewActivity" >
<ListView
android:id="@+id/listaromaneiosview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@color/Black"
android:dividerHeight="5dp"
tools:listitem="@layout/cre_004_listaromaneios_adpter" >
</ListView>
<TextView
android:id="@+id/textoListView"
android:text=""
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="3"
android:textSize="@dimen/titulo"/>
<ImageButton
android:id="@+id/selecionaRomaneio"
android:layout_width="30dp"
android:layout_height="match_parent"
android:layout_gravity="left"
android:layout_weight="1"
android:background="@color/White"
android:contentDescription="@string/app_name"
android:maxWidth="100dp"
android:onClick="actionListner"
android:src="@android:drawable/ic_menu_delete" />