Programme I
Implemented with LinearLayout, the code is as follows:
<!--winning record by MHD - <LinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Xmlns:tools= "Http://schemas.android.com/tools"Android:layout_width= "Match_parent"Android:layout_height= "Wrap_content"android:orientation= "vertical" > <ImageViewAndroid:layout_width= "Match_parent"Android:layout_height= "Wrap_content"android:contentdescription= "@string/imagetip"Android:scaletype= "Fitxy"android:src= "@drawable/prizelist_ad" /> <ListViewAndroid:layout_width= "Match_parent"Android:layout_height= "0DP"Android:id= "@+id/lv_prizelist"Android:layout_weight= "1" > </ListView> <includeLayout= "@layout/footer_copyright"Android:layout_height= "Wrap_content"Android:layout_width= "Match_parent" /> </LinearLayout>
android:layout_weight= "1" of the Focus ListView
Programme II
Implemented with Relativelayout, the code is as follows:
<Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent" > <ButtonAndroid:id= "@+id/button1"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_alignparentbottom= "true"//Set your button at the bottom android:layout_centerhorizontal= "true"Android:text= "button" /> <ListViewAndroid:id= "@android: Id/list"Android:layout_above= "@+id/button1"//Place ListView above button Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"Android:layout_alignparenttop= "true" > </ListView> </Relativelayout>
The point is android:layout_alignparentbottom= "true"
Android about ListView ScrollView Bottom control cannot be displayed for two solutions