diff options
| author | Ashley Rose <ashleyrose@google.com> | 2019-01-28 19:29:36 -0500 |
|---|---|---|
| committer | Ashley Rose <ashleyrose@google.com> | 2019-02-04 19:11:56 -0500 |
| commit | 55f9f92545209eddff13e120734e5e3b8190402a (patch) | |
| tree | 008771adad83260ce043695e5966cfdab233a19d /core/java/android/widget/GridView.java | |
| parent | 6296773cd05e1922b8c943ffe40099b53b9ef72b (diff) | |
@InspectableProperty coverage for android.widget
A few getters for view properties have been added where they were
missing. CTS tests for the new APIs are pending in b/123894719.
Test: m framework
Bug: 120492712
Change-Id: I743ce693d384eaf749ced3db7f81bda7d19ed275
Diffstat (limited to 'core/java/android/widget/GridView.java')
| -rw-r--r-- | core/java/android/widget/GridView.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java index f78180276373..bf65ec0d5de3 100644 --- a/core/java/android/widget/GridView.java +++ b/core/java/android/widget/GridView.java @@ -42,6 +42,7 @@ import android.view.accessibility.AccessibilityNodeInfo.CollectionInfo; import android.view.accessibility.AccessibilityNodeInfo.CollectionItemInfo; import android.view.accessibility.AccessibilityNodeProvider; import android.view.animation.GridLayoutAnimationController; +import android.view.inspector.InspectableProperty; import android.widget.RemoteViews.RemoteView; import com.android.internal.R; @@ -2061,6 +2062,7 @@ public class GridView extends AbsListView { * * @attr ref android.R.styleable#GridView_gravity */ + @InspectableProperty(valueType = InspectableProperty.ValueType.GRAVITY) public int getGravity() { return mGravity; } @@ -2096,6 +2098,7 @@ public class GridView extends AbsListView { * * @attr ref android.R.styleable#GridView_horizontalSpacing */ + @InspectableProperty public int getHorizontalSpacing() { return mHorizontalSpacing; } @@ -2147,6 +2150,7 @@ public class GridView extends AbsListView { * * @attr ref android.R.styleable#GridView_verticalSpacing */ + @InspectableProperty public int getVerticalSpacing() { return mVerticalSpacing; } @@ -2167,6 +2171,13 @@ public class GridView extends AbsListView { } @StretchMode + @InspectableProperty(enumMapping = { + @InspectableProperty.EnumMap(value = NO_STRETCH, name = "none"), + @InspectableProperty.EnumMap(value = STRETCH_SPACING, name = "spacingWidth"), + @InspectableProperty.EnumMap( + value = STRETCH_SPACING_UNIFORM, name = "spacingWidthUniform"), + @InspectableProperty.EnumMap(value = STRETCH_COLUMN_WIDTH, name = "columnWidth"), + }) public int getStretchMode() { return mStretchMode; } @@ -2197,6 +2208,7 @@ public class GridView extends AbsListView { * * @attr ref android.R.styleable#GridView_columnWidth */ + @InspectableProperty public int getColumnWidth() { return mColumnWidth; } @@ -2241,6 +2253,7 @@ public class GridView extends AbsListView { * @see #setNumColumns(int) */ @ViewDebug.ExportedProperty + @InspectableProperty public int getNumColumns() { return mNumColumns; } |
