From 84c6b95a7776ea5924a7c3e5a511c4df5c75924d Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 22 Feb 2011 11:15:42 -0800 Subject: [PATCH] Add documentation to GridView. Change-Id: Ic81e498ad05f0c9c33580ecd6ce895ff1b6e00c4 --- core/java/android/widget/GridView.java | 34 +++++++++++++++++++++++++++++++++- core/res/res/values/attrs.xml | 11 +++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java index a84df16d2d59..0383b5c8c0cd 100644 --- a/core/java/android/widget/GridView.java +++ b/core/java/android/widget/GridView.java @@ -37,14 +37,46 @@ import android.widget.RemoteViews.RemoteView; * *

See the Grid * View tutorial.

+ * + * @attr ref android.R.styleable#GridView_horizontalSpacing + * @attr ref android.R.styleable#GridView_verticalSpacing + * @attr ref android.R.styleable#GridView_stretchMode + * @attr ref android.R.styleable#GridView_columnWidth + * @attr ref android.R.styleable#GridView_numColumns + * @attr ref android.R.styleable#GridView_gravity */ @RemoteView public class GridView extends AbsListView { + /** + * Disables stretching. + * + * @see #setStretchMode(int) + */ public static final int NO_STRETCH = 0; + /** + * Stretches the spacing between columns. + * + * @see #setStretchMode(int) + */ public static final int STRETCH_SPACING = 1; + /** + * Stretches columns. + * + * @see #setStretchMode(int) + */ public static final int STRETCH_COLUMN_WIDTH = 2; + /** + * Stretches the spacing between columns. The spacing is uniform. + * + * @see #setStretchMode(int) + */ public static final int STRETCH_SPACING_UNIFORM = 3; - + + /** + * Creates as many columns as can fit on screen. + * + * @see #setNumColumns(int) + */ public static final int AUTO_FIT = -1; private int mNumColumns = AUTO_FIT; diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 8802003af518..de5317451e72 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -2253,18 +2253,29 @@ + + + + + + + + + + + -- 2.11.0