Set method documentation[Android Documentation] GridLayout uses the orientation property for two purposes:
To control the 'direction' in which default row/column indices are generated
when they are not specified in a component's layout parameters.
To control which axis should be processed first during the layout operation:
when orientation is GridLayout.Horizontal the horizontal axis is laid out first.
The order in which axes are laid out is important if, for example, the height of
one of GridLayout's children is dependent on its width - and its width is, in turn,
dependent on the widths of other components.
If your layout contains a Android.Widget.TextView (or derivative:
Button, EditText, CheckBox, etc.) which is
in multi-line mode (the default) it is normally best to leave GridLayout's
orientation as HORIZONTAL - because TextView is capable of
deriving its height for a given width, but not the other way around.
Other than the effects above, orientation does not affect the actual layout operation of
GridLayout, so it's fine to leave GridLayout in HORIZONTAL mode even if
the height of the intended layout greatly exceeds its width.
The default value of this property is GridLayout.Horizontal.
Requirements
Namespace: Android.Widget Assembly: Mono.Android (in Mono.Android.dll) Assembly Versions: 0.0.0.0 Since: Added in API level 14