Am learning android and am struggling to get my head around this particular layout attribute, reading the google dev docs it says:
android:layout_column
The index of the column in which this child should be. Must be an
integer value, such as “100”. This may also be a reference to a
resource (in the form “@[package:]type:name”) or theme attribute (in
the form “?[package:][type:]name”) containing a value of this type.
This corresponds to the global attribute resource symbol
layout_column.
Can anyone explain how this maps to an html equivalent (as table rows appear to borrow heavily from them)?
Is it the number of columns it take sup – eg colspan?
Uh, it means “the index of the column in which this child should be”. The only tricky part is that columns start at 0.
For example:
Both rows in the above layout have four columns. The first one has four columns because it has a
TextViewin column 0 and anEditTextspanning columns 1, 2, and 3. The second one has four columns because it skips columns 0 and 1 and puts the twoButtonwidgets in columns 2 and 3, courtesy of theandroid:layout_column="2"attribute in the firstButton.