Android Development Notes Tablelayout Common Properties Introduction _android

Source: Internet
Author: User

The attributes that tablelayout often use are:

Android:collapsecolumns: Hides the specified column in the No. 0 behavior sequence:

Android:collapsecolumns This property is empty, the effect is as follows:

The android:collapsecolumns=0,2--------------means to remove columns No. 0 and 2nd, as shown below:

Android:shrinkcolumns: Automatically extends the specified columns to fill the available sections in the No. 0 behavior sequence:

The shrinkcolumns does not work when the controls inside the Layoutrow are not yet covered, as shown in the following figure:

Set the shrinkcolumns=0,1,2, the layout is completely unchanged, because there is enough space in the Layoutrow.

When Layoutrow is full of controls, the following figure:

setting is set to shrinkcolumns=2, the result is that the control automatically fills the space vertically in the following illustration:

Android:stretchcolumns: In the No. 0 behavior sequence, try to fill the specified column with a blank part:

Set Stretchcolumns=1, the results are as follows, and the 1th column is filled as much as possible (BUTTON02 and TextView02 are filled right at the same time until TextView03 is squeeze to the last side).

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.