Android about ListView ScrollView Bottom control cannot be displayed for two solutions

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.