Footerview layout issues in Android ListView

Source: Internet
Author: User

In doing the ListView pull load encountered problems, not clear what the principle, specifically did not study carefully, mark.

The layout interface is as follows:

Foot1.xml

<?XML version= "1.0" encoding= "Utf-8"?><Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Match_parent"Android:layout_height= "Wrap_content"android:gravity= "Center"Android:background= "#f1f1f1" >        <TextViewAndroid:layout_width= "Wrap_content"Android:layout_height= "50dip"android:gravity= "Center"Android:text= "View More"android:textsize= "18SP" /></Relativelayout>

Foot2.xml

<?XML version= "1.0" encoding= "Utf-8"?><Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Match_parent"Android:layout_height= "50dip"android:gravity= "Center"Android:background= "#f1f1f1" >        <TextViewAndroid:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"android:gravity= "Center"Android:text= "View More"android:textsize= "18SP" /></Relativelayout>

The two layout interfaces, which appear to be the same, show two effects in the Footerview of a ListView.
The height of the TextView is set to 50dip in the Footer1.xml, and the root layout is set to the package content, so the footer of the ListView is actually 50dip in the actual display, but the footer2.xml in the root layout has a height of 50dip, which is actually loaded into the L Istview Footerview in the post but no effect, his height changed to wrap_content, and TextView height is also set to Wrap_content, so the actual height of the display is the height of the TextView content, that is, the height of the font.

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.