diff options
-rw-r--r-- | core/java/android/view/View.java | 54 | ||||
-rw-r--r-- | core/java/android/view/ViewDebug.java | 39 | ||||
-rw-r--r-- | core/java/android/view/ViewGroup.java | 22 | ||||
-rw-r--r-- | core/java/android/widget/AbsListView.java | 6 | ||||
-rw-r--r-- | core/java/android/widget/AdapterView.java | 8 | ||||
-rw-r--r-- | core/java/android/widget/FrameLayout.java | 21 | ||||
-rw-r--r-- | core/java/android/widget/LinearLayout.java | 22 | ||||
-rw-r--r-- | core/java/android/widget/ListView.java | 2 | ||||
-rw-r--r-- | core/java/android/widget/ProgressBar.java | 8 | ||||
-rw-r--r-- | core/java/android/widget/RelativeLayout.java | 4 | ||||
-rw-r--r-- | core/java/android/widget/TableRow.java | 4 | ||||
-rw-r--r-- | core/java/android/widget/TextView.java | 6 |
12 files changed, 109 insertions, 87 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 603ad898ef80..1b3975f1c996 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -1375,14 +1375,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * Width as measured during measure pass. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "measurement") protected int mMeasuredWidth; /** * Height as measured during measure pass. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "measurement") protected int mMeasuredHeight; /** @@ -1729,28 +1729,28 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * to the left edge of this view. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") protected int mLeft; /** * The distance in pixels from the left edge of this view's parent * to the right edge of this view. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") protected int mRight; /** * The distance in pixels from the top edge of this view's parent * to the top edge of this view. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") protected int mTop; /** * The distance in pixels from the top edge of this view's parent * to the bottom edge of this view. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") protected int mBottom; /** @@ -1758,14 +1758,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * horizontally. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "scrolling") protected int mScrollX; /** * The offset, in pixels, by which the content of this view is scrolled * vertically. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "scrolling") protected int mScrollY; /** @@ -1773,28 +1773,28 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * left edge of this view and the left edge of its content. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "padding") protected int mPaddingLeft; /** * The right padding in pixels, that is the distance in pixels between the * right edge of this view and the right edge of its content. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "padding") protected int mPaddingRight; /** * The top padding in pixels, that is the distance in pixels between the * top edge of this view and the top edge of its content. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "padding") protected int mPaddingTop; /** * The bottom padding in pixels, that is the distance in pixels between the * bottom edge of this view and the bottom edge of its content. * {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "padding") protected int mPaddingBottom; /** @@ -1805,13 +1805,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility /** * Cache the paddingRight set by the user to append to the scrollbar's size. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "padding") int mUserPaddingRight; /** * Cache the paddingBottom set by the user to append to the scrollbar's size. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "padding") int mUserPaddingBottom; /** @@ -1918,14 +1918,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * The minimum height of the view. We'll try our best to have the height * of this view to at least this amount. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "measurement") private int mMinHeight; /** * The minimum width of the view. We'll try our best to have the width * of this view to at least this amount. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "measurement") private int mMinWidth; /** @@ -2767,7 +2767,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * * @return True if this view has or contains focus, false otherwise. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "focus") public boolean hasFocus() { return (mPrivateFlags & FOCUSED) != 0; } @@ -2945,7 +2945,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * * @return True if this view has focus, false otherwise. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "focus") public boolean isFocused() { return (mPrivateFlags & FOCUSED) != 0; } @@ -3356,7 +3356,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * * @return true if this view has nothing to draw, false otherwise */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "drawing") public boolean willNotDraw() { return (mViewFlags & DRAW_MASK) == WILL_NOT_DRAW; } @@ -3379,7 +3379,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * * @return true if this view does not cache its drawing, false otherwise */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "drawing") public boolean willNotCacheDrawing() { return (mViewFlags & WILL_NOT_CACHE_DRAWING) == WILL_NOT_CACHE_DRAWING; } @@ -3554,7 +3554,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * @return True if this view can take focus, or false otherwise. * @attr ref android.R.styleable#View_focusable */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "focus") public final boolean isFocusable() { return FOCUSABLE == (mViewFlags & FOCUSABLE_MASK); } @@ -4865,7 +4865,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * * @return The width of your view, in pixels. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public final int getWidth() { return mRight - mLeft; } @@ -4875,7 +4875,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * * @return The height of your view, in pixels. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public final int getHeight() { return mBottom - mTop; } @@ -5602,7 +5602,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * of ViewGroup that are responsible for arranging their children. * @return The LayoutParams associated with this view */ - @ViewDebug.ExportedProperty(deepExport = true, prefix = "layout_") + @ViewDebug.ExportedProperty(deepExport = true, category = "layout") public ViewGroup.LayoutParams getLayoutParams() { return mLayoutParams; } @@ -5916,7 +5916,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * * @return True if this View is guaranteed to be fully opaque, false otherwise. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "drawing") public boolean isOpaque() { return (mPrivateFlags & OPAQUE_MASK) == OPAQUE_MASK; } @@ -7001,7 +7001,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * @see #setDrawingCacheEnabled(boolean) * @see #getDrawingCache() */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "drawing") public boolean isDrawingCacheEnabled() { return (mViewFlags & DRAWING_CACHE_ENABLED) == DRAWING_CACHE_ENABLED; } @@ -8865,7 +8865,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * @return the offset of the baseline within the widget's bounds or -1 * if baseline alignment is not supported */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public int getBaseline() { return -1; } diff --git a/core/java/android/view/ViewDebug.java b/core/java/android/view/ViewDebug.java index 09939a6d7ffd..7908f3615e6d 100644 --- a/core/java/android/view/ViewDebug.java +++ b/core/java/android/view/ViewDebug.java @@ -255,6 +255,14 @@ public class ViewDebug { * @see #deepExport() */ String prefix() default ""; + + /** + * Specifies the category the property falls into, such as measurement, + * layout, drawing, etc. + * + * @return the category as String + */ + String category() default ""; } /** @@ -1368,9 +1376,13 @@ public class ViewDebug { // TODO: This should happen on the UI thread Object methodValue = method.invoke(view, (Object[]) null); final Class<?> returnType = method.getReturnType(); + final ExportedProperty property = sAnnotations.get(method); + String fullName = (property.category().length() == 0) ? + method.getName() : + (property.category() + ":" + method.getName()); if (returnType == int.class) { - final ExportedProperty property = sAnnotations.get(method); + if (property.resolveId() && context != null) { final int id = (Integer) methodValue; methodValue = resolveId(context, id); @@ -1378,7 +1390,7 @@ public class ViewDebug { final FlagToString[] flagsMapping = property.flagMapping(); if (flagsMapping.length > 0) { final int intValue = (Integer) methodValue; - final String valuePrefix = prefix + method.getName() + '_'; + final String valuePrefix = prefix + fullName + '_'; exportUnrolledFlags(out, flagsMapping, intValue, valuePrefix); } @@ -1402,21 +1414,22 @@ public class ViewDebug { } } } else if (returnType == int[].class) { - final ExportedProperty property = sAnnotations.get(method); final int[] array = (int[]) methodValue; - final String valuePrefix = prefix + method.getName() + '_'; + final String valuePrefix = prefix + fullName + '_'; final String suffix = "()"; exportUnrolledArray(context, out, property, array, valuePrefix, suffix); + + // Probably want to return here, same as for fields. + return; } else if (!returnType.isPrimitive()) { - final ExportedProperty property = sAnnotations.get(method); if (property.deepExport()) { dumpViewProperties(context, methodValue, out, prefix + property.prefix()); continue; } } - writeEntry(out, prefix, method.getName(), "()", methodValue); + writeEntry(out, prefix, fullName, "()", methodValue); } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { } @@ -1436,9 +1449,13 @@ public class ViewDebug { try { Object fieldValue = null; final Class<?> type = field.getType(); + final ExportedProperty property = sAnnotations.get(field); + String fullName = (property.category().length() == 0) ? + field.getName() : + (property.category() + ":" + field.getName()); if (type == int.class) { - final ExportedProperty property = sAnnotations.get(field); + if (property.resolveId() && context != null) { final int id = field.getInt(view); fieldValue = resolveId(context, id); @@ -1446,7 +1463,7 @@ public class ViewDebug { final FlagToString[] flagsMapping = property.flagMapping(); if (flagsMapping.length > 0) { final int intValue = field.getInt(view); - final String valuePrefix = prefix + field.getName() + '_'; + final String valuePrefix = prefix + fullName + '_'; exportUnrolledFlags(out, flagsMapping, intValue, valuePrefix); } @@ -1468,9 +1485,8 @@ public class ViewDebug { } } } else if (type == int[].class) { - final ExportedProperty property = sAnnotations.get(field); final int[] array = (int[]) field.get(view); - final String valuePrefix = prefix + field.getName() + '_'; + final String valuePrefix = prefix + fullName + '_'; final String suffix = ""; exportUnrolledArray(context, out, property, array, valuePrefix, suffix); @@ -1478,7 +1494,6 @@ public class ViewDebug { // We exit here! return; } else if (!type.isPrimitive()) { - final ExportedProperty property = sAnnotations.get(field); if (property.deepExport()) { dumpViewProperties(context, field.get(view), out, prefix + property.prefix()); @@ -1490,7 +1505,7 @@ public class ViewDebug { fieldValue = field.get(view); } - writeEntry(out, prefix, field.getName(), "", fieldValue); + writeEntry(out, prefix, fullName, "", fieldValue); } catch (IllegalAccessException e) { } } diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index fa86a689a1b4..e2f9c1513238 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -377,7 +377,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * @return one of {@link #FOCUS_BEFORE_DESCENDANTS}, {@link #FOCUS_AFTER_DESCENDANTS}, * {@link #FOCUS_BLOCK_DESCENDANTS}. */ - @ViewDebug.ExportedProperty(mapping = { + @ViewDebug.ExportedProperty(category = "focus", mapping = { @ViewDebug.IntToString(from = FOCUS_BEFORE_DESCENDANTS, to = "FOCUS_BEFORE_DESCENDANTS"), @ViewDebug.IntToString(from = FOCUS_AFTER_DESCENDANTS, to = "FOCUS_AFTER_DESCENDANTS"), @ViewDebug.IntToString(from = FOCUS_BLOCK_DESCENDANTS, to = "FOCUS_BLOCK_DESCENDANTS") @@ -2832,7 +2832,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * @see #setChildrenDrawnWithCacheEnabled(boolean) * @see View#setDrawingCacheEnabled(boolean) */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "drawing") public boolean isAlwaysDrawnWithCacheEnabled() { return (mGroupFlags & FLAG_ALWAYS_DRAWN_WITH_CACHE) == FLAG_ALWAYS_DRAWN_WITH_CACHE; } @@ -2867,7 +2867,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * @see #setAlwaysDrawnWithCacheEnabled(boolean) * @see #setChildrenDrawnWithCacheEnabled(boolean) */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "drawing") protected boolean isChildrenDrawnWithCacheEnabled() { return (mGroupFlags & FLAG_CHILDREN_DRAWN_WITH_CACHE) == FLAG_CHILDREN_DRAWN_WITH_CACHE; } @@ -2899,7 +2899,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * @see #setChildrenDrawingOrderEnabled(boolean) * @see #getChildDrawingOrder(int, int) */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "drawing") protected boolean isChildrenDrawingOrderEnabled() { return (mGroupFlags & FLAG_USE_CHILD_DRAWING_ORDER) == FLAG_USE_CHILD_DRAWING_ORDER; } @@ -2936,7 +2936,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * {@link #PERSISTENT_ANIMATION_CACHE}, {@link #PERSISTENT_SCROLLING_CACHE} * and {@link #PERSISTENT_ALL_CACHES} */ - @ViewDebug.ExportedProperty(mapping = { + @ViewDebug.ExportedProperty(category = "drawing", mapping = { @ViewDebug.IntToString(from = PERSISTENT_NO_CACHE, to = "NONE"), @ViewDebug.IntToString(from = PERSISTENT_ANIMATION_CACHE, to = "ANIMATION"), @ViewDebug.IntToString(from = PERSISTENT_SCROLLING_CACHE, to = "SCROLLING"), @@ -3569,7 +3569,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * constants FILL_PARENT (replaced by MATCH_PARENT , * in API Level 8) or WRAP_CONTENT. or an exact size. */ - @ViewDebug.ExportedProperty(mapping = { + @ViewDebug.ExportedProperty(category = "layout", mapping = { @ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"), @ViewDebug.IntToString(from = WRAP_CONTENT, to = "WRAP_CONTENT") }) @@ -3580,7 +3580,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * constants FILL_PARENT (replaced by MATCH_PARENT , * in API Level 8) or WRAP_CONTENT. or an exact size. */ - @ViewDebug.ExportedProperty(mapping = { + @ViewDebug.ExportedProperty(category = "layout", mapping = { @ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"), @ViewDebug.IntToString(from = WRAP_CONTENT, to = "WRAP_CONTENT") }) @@ -3705,25 +3705,25 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * The left margin in pixels of the child. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public int leftMargin; /** * The top margin in pixels of the child. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public int topMargin; /** * The right margin in pixels of the child. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public int rightMargin; /** * The bottom margin in pixels of the child. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public int bottomMargin; /** diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index 372cc833ced6..e572d3dc65a4 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -3998,7 +3998,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te * View type for this view, as returned by * {@link android.widget.Adapter#getItemViewType(int) } */ - @ViewDebug.ExportedProperty(mapping = { + @ViewDebug.ExportedProperty(category = "list", mapping = { @ViewDebug.IntToString(from = ITEM_VIEW_TYPE_IGNORE, to = "ITEM_VIEW_TYPE_IGNORE"), @ViewDebug.IntToString(from = ITEM_VIEW_TYPE_HEADER_OR_FOOTER, to = "ITEM_VIEW_TYPE_HEADER_OR_FOOTER") }) @@ -4010,7 +4010,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te * been added to the list view and whether they should be treated as * recycled views or not. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "list") boolean recycledHeaderFooter; /** @@ -4021,7 +4021,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te * view to be attached to the window rather than just attached to the * parent. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "list") boolean forceAdd; public LayoutParams(Context c, AttributeSet attrs) { diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java index fe6d91ac9d63..10a87295ccf5 100644 --- a/core/java/android/widget/AdapterView.java +++ b/core/java/android/widget/AdapterView.java @@ -56,7 +56,7 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { /** * The position of the first child displayed */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "scrolling") int mFirstPosition = 0; /** @@ -141,7 +141,7 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { * The position within the adapter's data set of the item to select * during the next layout. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "list") int mNextSelectedPosition = INVALID_POSITION; /** @@ -152,7 +152,7 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { /** * The position within the adapter's data set of the currently selected item. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "list") int mSelectedPosition = INVALID_POSITION; /** @@ -168,7 +168,7 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup { /** * The number of items in the current adapter. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "list") int mItemCount; /** diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java index e27bb4fe2073..e4451800752b 100644 --- a/core/java/android/widget/FrameLayout.java +++ b/core/java/android/widget/FrameLayout.java @@ -46,27 +46,32 @@ import android.widget.RemoteViews.RemoteView; */ @RemoteView public class FrameLayout extends ViewGroup { - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "measurement") boolean mMeasureAllChildren = false; - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "drawing") private Drawable mForeground; - @ViewDebug.ExportedProperty + + @ViewDebug.ExportedProperty(category = "padding") private int mForegroundPaddingLeft = 0; - @ViewDebug.ExportedProperty + + @ViewDebug.ExportedProperty(category = "padding") private int mForegroundPaddingTop = 0; - @ViewDebug.ExportedProperty + + @ViewDebug.ExportedProperty(category = "padding") private int mForegroundPaddingRight = 0; - @ViewDebug.ExportedProperty + + @ViewDebug.ExportedProperty(category = "padding") private int mForegroundPaddingBottom = 0; private final Rect mSelfBounds = new Rect(); private final Rect mOverlayBounds = new Rect(); - @ViewDebug.ExportedProperty + + @ViewDebug.ExportedProperty(category = "drawing") private int mForegroundGravity = Gravity.FILL; /** {@hide} */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "drawing") protected boolean mForegroundInPadding = true; boolean mForegroundBoundsChanged = false; diff --git a/core/java/android/widget/LinearLayout.java b/core/java/android/widget/LinearLayout.java index 7254c3cfd359..53187bf01ebd 100644 --- a/core/java/android/widget/LinearLayout.java +++ b/core/java/android/widget/LinearLayout.java @@ -57,7 +57,7 @@ public class LinearLayout extends ViewGroup { * Whether the children of this layout are baseline aligned. Only applicable * if {@link #mOrientation} is horizontal. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") private boolean mBaselineAligned = true; /** @@ -67,7 +67,7 @@ public class LinearLayout extends ViewGroup { * Note: this is orthogonal to {@link #mBaselineAligned}, which is concerned * with whether the children of this layout are baseline aligned. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") private int mBaselineAlignedChildIndex = -1; /** @@ -75,12 +75,13 @@ public class LinearLayout extends ViewGroup { * We'll calculate the baseline of this layout as we measure vertically; for * horizontal linear layouts, the offset of 0 is appropriate. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "measurement") private int mBaselineChildTop = 0; - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "measurement") private int mOrientation; - @ViewDebug.ExportedProperty(mapping = { + + @ViewDebug.ExportedProperty(category = "measurement", mapping = { @ViewDebug.IntToString(from = -1, to = "NONE"), @ViewDebug.IntToString(from = Gravity.NO_GRAVITY, to = "NONE"), @ViewDebug.IntToString(from = Gravity.TOP, to = "TOP"), @@ -95,13 +96,14 @@ public class LinearLayout extends ViewGroup { @ViewDebug.IntToString(from = Gravity.FILL, to = "FILL") }) private int mGravity = Gravity.LEFT | Gravity.TOP; - @ViewDebug.ExportedProperty + + @ViewDebug.ExportedProperty(category = "measurement") private int mTotalLength; - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") private float mWeightSum; - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") private boolean mUseLargestChild; private int[] mMaxAscent; @@ -1401,7 +1403,7 @@ public class LinearLayout extends ViewGroup { * 0 if the view should not be stretched. Otherwise the extra pixels * will be pro-rated among all views whose weight is greater than 0. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public float weight; /** @@ -1409,7 +1411,7 @@ public class LinearLayout extends ViewGroup { * * @see android.view.Gravity */ - @ViewDebug.ExportedProperty(mapping = { + @ViewDebug.ExportedProperty(category = "layout", mapping = { @ViewDebug.IntToString(from = -1, to = "NONE"), @ViewDebug.IntToString(from = Gravity.NO_GRAVITY, to = "NONE"), @ViewDebug.IntToString(from = Gravity.TOP, to = "TOP"), diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java index 0bb41e584eed..0d0a1ba0eae6 100644 --- a/core/java/android/widget/ListView.java +++ b/core/java/android/widget/ListView.java @@ -1186,7 +1186,7 @@ public class ListView extends AbsListView { * UNSPECIFIED/AT_MOST modes, false otherwise. * @hide */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "list") protected boolean recycleOnMeasure() { return true; } diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java index 71f0c2f9320c..0f52fc81e7bb 100644 --- a/core/java/android/widget/ProgressBar.java +++ b/core/java/android/widget/ProgressBar.java @@ -336,7 +336,7 @@ public class ProgressBar extends View { * * @return true if the progress bar is in indeterminate mode */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "progress") public synchronized boolean isIndeterminate() { return mIndeterminate; } @@ -609,7 +609,7 @@ public class ProgressBar extends View { * @see #setMax(int) * @see #getMax() */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "progress") public synchronized int getProgress() { return mIndeterminate ? 0 : mProgress; } @@ -626,7 +626,7 @@ public class ProgressBar extends View { * @see #setMax(int) * @see #getMax() */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "progress") public synchronized int getSecondaryProgress() { return mIndeterminate ? 0 : mSecondaryProgress; } @@ -640,7 +640,7 @@ public class ProgressBar extends View { * @see #getProgress() * @see #getSecondaryProgress() */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "progress") public synchronized int getMax() { return mMax; } diff --git a/core/java/android/widget/RelativeLayout.java b/core/java/android/widget/RelativeLayout.java index 1aa1df30afa0..64cda49ade65 100644 --- a/core/java/android/widget/RelativeLayout.java +++ b/core/java/android/widget/RelativeLayout.java @@ -1011,7 +1011,7 @@ public class RelativeLayout extends ViewGroup { * @attr ref android.R.styleable#RelativeLayout_Layout_layout_centerVertical */ public static class LayoutParams extends ViewGroup.MarginLayoutParams { - @ViewDebug.ExportedProperty(resolveId = true, indexMapping = { + @ViewDebug.ExportedProperty(category = "layout", resolveId = true, indexMapping = { @ViewDebug.IntToString(from = ABOVE, to = "above"), @ViewDebug.IntToString(from = ALIGN_BASELINE, to = "alignBaseline"), @ViewDebug.IntToString(from = ALIGN_BOTTOM, to = "alignBottom"), @@ -1040,7 +1040,7 @@ public class RelativeLayout extends ViewGroup { * When true, uses the parent as the anchor if the anchor doesn't exist or if * the anchor's visibility is GONE. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public boolean alignWithParent; public LayoutParams(Context c, AttributeSet attrs) { diff --git a/core/java/android/widget/TableRow.java b/core/java/android/widget/TableRow.java index 48d12df8eb16..b612004c5b77 100644 --- a/core/java/android/widget/TableRow.java +++ b/core/java/android/widget/TableRow.java @@ -387,13 +387,13 @@ public class TableRow extends LinearLayout { /** * <p>The column index of the cell represented by the widget.</p> */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public int column; /** * <p>The number of columns the widgets spans over.</p> */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "layout") public int span; private static final int LOCATION = 0; diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index f3f68f9616cb..b413aee8bbd7 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -5818,7 +5818,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener /** * Convenience for {@link Selection#getSelectionStart}. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "text") public int getSelectionStart() { return Selection.getSelectionStart(getText()); } @@ -5826,7 +5826,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener /** * Convenience for {@link Selection#getSelectionEnd}. */ - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "text") public int getSelectionEnd() { return Selection.getSelectionEnd(getText()); } @@ -8062,7 +8062,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } - @ViewDebug.ExportedProperty + @ViewDebug.ExportedProperty(category = "text") private CharSequence mText; private CharSequence mTransformed; private BufferType mBufferType = BufferType.NORMAL; |