Android Development note tablelayout commonly used properties introduction

Source: Internet
Author: User

Today I saw the layout of the Android simple control, there are almost absolute, relative, tabular, linear, frame layout Five ways, the table layout of some of the properties are relatively complex, the following is mainly about the table layout of some properties

The properties commonly used by Tablelayout are:

Android:collapsecolumns: Hides the specified column in the No. 0 action order:

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

The android:collapsecolumns=0,2--------------"means to remove the No. 0 and 2nd columns, such as:

Android:shrinkcolumns: In the No. 0 order, automatically extends the specified column to fill the available parts:

Shrinkcolumns does not work when the controls inside the Layoutrow are not covered by the layout, such as:

Set the shrinkcolumns=0,1,2, the layout has not changed completely, because there is still enough space in the Layoutrow.

When the layoutrow is covered with controls, such as:

Setting shrinkcolumns=2, the result is that the control automatically fills the space in the vertical direction:

Android:stretchcolumns: With the No. 0 action order, fill in the blanks with the specified columns as much as possible:

If you set Stretchcolumns=1, the result is that the 1th column is populated as far as possible (BUTTON02 and TextView02 are padded to the right until TextView03 is squeeze to the last edge).

Articles you may be interested in:
    • The eclipse shortcuts used in Android development are detailed
    • The use of Android Timers (chronometer) and common methods
    • Android Common Command collection (illustrated for Beginners)
    • Four common ways to summarize Android button click events
    • Android Practical Code Snippets Common code Summary
    • 19 Common Android Tools Class summary
    • Some of the tips used in Android development

Android Development note tablelayout commonly used properties introduction

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.