Loading core/java/android/widget/GridLayout.java +27 −2 Original line number Diff line number Diff line Loading @@ -294,8 +294,32 @@ public class GridLayout extends ViewGroup { } /** * Orientation is used only to generate default row/column indices when * they are not specified by a component's layout parameters. * * GridLayout uses the orientation property for two purposes: * <ul> * <li> * To control the 'direction' in which default row/column indices are generated * when they are not specified in a component's layout parameters. * </li> * <li> * To control which axis should be processed first during the layout operation: * when orientation is {@link #HORIZONTAL} the horizontal axis is laid out first. * </li> * </ul> * * 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. * <p> * If your layout contains a {@link TextView} (or derivative: * {@code Button}, {@code EditText}, {@code CheckBox}, etc.) which is * in multi-line mode (the default) it is normally best to leave GridLayout's * orientation as {@code HORIZONTAL} - because {@code TextView} is capable of * deriving its height for a given width, but not the other way around. * <p> * Other than the effects above, orientation does not affect the actual layout operation of * GridLayout, so it's fine to leave GridLayout in {@code HORIZONTAL} mode even if * the height of the intended layout greatly exceeds its width. * <p> * The default value of this property is {@link #HORIZONTAL}. * Loading Loading @@ -1373,6 +1397,7 @@ public class GridLayout extends ViewGroup { break; } case PENDING: { // le singe est dans l'arbre assert false; break; } Loading Loading
core/java/android/widget/GridLayout.java +27 −2 Original line number Diff line number Diff line Loading @@ -294,8 +294,32 @@ public class GridLayout extends ViewGroup { } /** * Orientation is used only to generate default row/column indices when * they are not specified by a component's layout parameters. * * GridLayout uses the orientation property for two purposes: * <ul> * <li> * To control the 'direction' in which default row/column indices are generated * when they are not specified in a component's layout parameters. * </li> * <li> * To control which axis should be processed first during the layout operation: * when orientation is {@link #HORIZONTAL} the horizontal axis is laid out first. * </li> * </ul> * * 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. * <p> * If your layout contains a {@link TextView} (or derivative: * {@code Button}, {@code EditText}, {@code CheckBox}, etc.) which is * in multi-line mode (the default) it is normally best to leave GridLayout's * orientation as {@code HORIZONTAL} - because {@code TextView} is capable of * deriving its height for a given width, but not the other way around. * <p> * Other than the effects above, orientation does not affect the actual layout operation of * GridLayout, so it's fine to leave GridLayout in {@code HORIZONTAL} mode even if * the height of the intended layout greatly exceeds its width. * <p> * The default value of this property is {@link #HORIZONTAL}. * Loading Loading @@ -1373,6 +1397,7 @@ public class GridLayout extends ViewGroup { break; } case PENDING: { // le singe est dans l'arbre assert false; break; } Loading