Common attributes of TableLayout in Android Development notes

Source: Internet
Author: User

Frequently Used attributes of TableLayout include:

Android: collapseColumns: hides the specified column in sequence of 0th actions:

Android: collapseColumns when this attribute is null, the effect is as follows:

Remove columns 0th and 2nd from android: collapseColumns = --------------, for example:

Android: shrinkColumns: automatically extends the specified columns to fill the available parts in the order of 0th actions:

When the controls in LayoutRow are not full, shrinkColumns does not work, for example:

If shrinkColumns =, 2 is set, the layout is not changed because there is enough space in LayoutRow.

When LayoutRow is filled with controls, for example:

If shrinkColumns = 2 is set, the result is as follows: the control automatically fills the space in the vertical direction:

Android: stretchColumns: In The 0th action order, try to fill the specified column with the blank part:

Set stretchColumns = 1. The result is as follows: column 1st is filled as much as possible (both Button02 and TextView02 are filled to the right until TextView03 is pressed to the last side ).

Related Article

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.