Android GridView Property

Source: Internet
Author: User

1 <GridViewAndroid:id= "@+id/grid"  2 Android:layout_width= "Fill_parent"  3 Android:layout_height= "Fill_parent"  4 android:verticalspacing= "35px"<!--vertical spacing between grid elements-->  5Android:horizontalspacing= "5px"<!--horizontal interval between grid elements -  6Android:numcolumns= "Auto_fit"<!--indicates how many columns, if set to Auto_fit, are automatically calculated based on columnwidth and spacing -  7Android:columnwidth= "100px"<!--It is generally recommended to use a dip or DP with a pixel-density-independent representation -  8Android:stretchmode= "ColumnWidth"<!--How to fill the spare position, simulator using wvga800*480, each row of 4 columns, there is 4*100+5*3=415, still more than 65px of space, if it is columnwidth, then the remaining 65 will be allocated to 4 columns, each column increased 16/17px. If Spacingwidth is used, allocate to 3 spacer spaces -  9android:gravity= "Center"/>

 

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.