Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2879c9c9 authored by Ember Rose's avatar Ember Rose Committed by Android (Google) Code Review
Browse files

Merge "@InspectableProperty coverage for android.widget"

parents 03da687d 55f9f925
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -54862,6 +54862,7 @@ package android.widget {
    method public int getCheckedItemPosition();
    method public android.util.SparseBooleanArray getCheckedItemPositions();
    method public int getChoiceMode();
    method public boolean getDrawSelectorOnTop();
    method public int getListPaddingBottom();
    method public int getListPaddingLeft();
    method public int getListPaddingRight();
@@ -56476,6 +56477,7 @@ package android.widget {
    ctor public RelativeLayout(android.content.Context, android.util.AttributeSet, int, int);
    method public android.widget.RelativeLayout.LayoutParams generateLayoutParams(android.util.AttributeSet);
    method public int getGravity();
    method public int getIgnoreGravity();
    method public void setGravity(int);
    method public void setHorizontalGravity(int);
    method public void setIgnoreGravity(int);
@@ -56692,8 +56694,9 @@ package android.widget {
    method public CharSequence getQuery();
    method @Nullable public CharSequence getQueryHint();
    method public android.widget.CursorAdapter getSuggestionsAdapter();
    method public boolean isIconfiedByDefault();
    method @Deprecated public boolean isIconfiedByDefault();
    method public boolean isIconified();
    method public boolean isIconifiedByDefault();
    method public boolean isQueryRefinementEnabled();
    method public boolean isSubmitButtonEnabled();
    method public void onActionViewCollapsed();
@@ -57416,6 +57419,7 @@ package android.widget {
    ctor public ToggleButton(android.content.Context, android.util.AttributeSet, int);
    ctor public ToggleButton(android.content.Context, android.util.AttributeSet);
    ctor public ToggleButton(android.content.Context);
    method public float getDisabledAlpha();
    method public CharSequence getTextOff();
    method public CharSequence getTextOn();
    method public void setBackgroundDrawable(android.graphics.drawable.Drawable);
@@ -57576,6 +57580,7 @@ package android.widget {
  @android.widget.RemoteViews.RemoteView public class ViewFlipper extends android.widget.ViewAnimator {
    ctor public ViewFlipper(android.content.Context);
    ctor public ViewFlipper(android.content.Context, android.util.AttributeSet);
    method public int getFlipInterval();
    method public boolean isAutoStart();
    method public boolean isFlipping();
    method public void setAutoStart(boolean);
+2 −2
Original line number Diff line number Diff line
@@ -2745,7 +2745,7 @@ package android.widget {
  }

  public class DatePicker extends android.widget.FrameLayout {
    method public int getMode();
    method @android.view.inspector.InspectableProperty(name="datePickerMode", enumMapping={@android.view.inspector.InspectableProperty.EnumMap(value=android.widget.DatePicker.MODE_SPINNER, name="spinner"), @android.view.inspector.InspectableProperty.EnumMap(value=android.widget.DatePicker.MODE_CALENDAR, name="calendar")}) public int getMode();
    field public static final int MODE_CALENDAR = 2; // 0x2
    field public static final int MODE_SPINNER = 1; // 0x1
  }
@@ -2781,7 +2781,7 @@ package android.widget {
    method public android.view.View getAmView();
    method public android.view.View getHourView();
    method public android.view.View getMinuteView();
    method public int getMode();
    method @android.view.inspector.InspectableProperty(name="timePickerMode", enumMapping={@android.view.inspector.InspectableProperty.EnumMap(name="clock", value=android.widget.TimePicker.MODE_CLOCK), @android.view.inspector.InspectableProperty.EnumMap(name="spinner", value=android.widget.TimePicker.MODE_SPINNER)}) public int getMode();
    method public android.view.View getPmView();
    field public static final int MODE_CLOCK = 2; // 0x2
    field public static final int MODE_SPINNER = 1; // 0x1
+1 −0
Original line number Diff line number Diff line
@@ -21733,6 +21733,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @return The known solid color background for this view, or 0 if the color may vary
     */
    @ViewDebug.ExportedProperty(category = "drawing")
    @InspectableProperty
    @ColorInt
    public int getSolidColor() {
        return 0;
+26 −0
Original line number Diff line number Diff line
@@ -60,6 +60,8 @@ import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController;
import android.view.animation.Transformation;
import android.view.autofill.Helper;
import android.view.inspector.InspectableProperty;
import android.view.inspector.InspectableProperty.EnumMap;

import com.android.internal.R;

@@ -773,6 +775,11 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        @ViewDebug.IntToString(from = FOCUS_AFTER_DESCENDANTS, to = "FOCUS_AFTER_DESCENDANTS"),
        @ViewDebug.IntToString(from = FOCUS_BLOCK_DESCENDANTS, to = "FOCUS_BLOCK_DESCENDANTS")
    })
    @InspectableProperty(enumMapping = {
            @EnumMap(value = FOCUS_BEFORE_DESCENDANTS, name = "beforeDescendants"),
            @EnumMap(value = FOCUS_AFTER_DESCENDANTS, name = "afterDescendants"),
            @EnumMap(value = FOCUS_BLOCK_DESCENDANTS, name = "blocksDescendants")
    })
    public int getDescendantFocusability() {
        return mGroupFlags & FLAG_MASK_FOCUSABILITY;
    }
@@ -1391,6 +1398,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     * Check whether this ViewGroup should ignore focus requests for itself and its children.
     */
    @ViewDebug.ExportedProperty(category = "focus")
    @InspectableProperty
    public boolean getTouchscreenBlocksFocus() {
        return (mGroupFlags & FLAG_TOUCHSCREEN_BLOCKS_FOCUS) != 0;
    }
@@ -3116,6 +3124,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     * Returns true if MotionEvents dispatched to this ViewGroup can be split to multiple children.
     * @return true if MotionEvents dispatched to this ViewGroup can be split to multiple children.
     */
    @InspectableProperty(name = "splitMotionEvents")
    public boolean isMotionEventSplittingEnabled() {
        return (mGroupFlags & FLAG_SPLIT_MOTION_EVENTS) == FLAG_SPLIT_MOTION_EVENTS;
    }
@@ -3132,6 +3141,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     * {@link android.view.ViewOutlineProvider#BACKGROUND} was given to
     * {@link #setOutlineProvider(ViewOutlineProvider)} and false otherwise.
     */
    @InspectableProperty
    public boolean isTransitionGroup() {
        if ((mGroupFlags & FLAG_IS_TRANSITION_GROUP_SET) != 0) {
            return ((mGroupFlags & FLAG_IS_TRANSITION_GROUP) != 0);
@@ -4436,6 +4446,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     * false otherwise.
     */
    @ViewDebug.ExportedProperty(category = "drawing")
    @InspectableProperty
    public boolean getClipChildren() {
        return ((mGroupFlags & FLAG_CLIP_CHILDREN) != 0);
    }
@@ -4493,6 +4504,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     * @attr ref android.R.styleable#ViewGroup_clipToPadding
     */
    @ViewDebug.ExportedProperty(category = "drawing")
    @InspectableProperty
    public boolean getClipToPadding() {
        return hasBooleanFlag(FLAG_CLIP_TO_PADDING);
    }
@@ -6340,6 +6352,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     *
     * @return the current animation controller
     */
    @InspectableProperty
    public LayoutAnimationController getLayoutAnimation() {
        return mLayoutAnimationController;
    }
@@ -6359,6 +6372,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     * Caching behavior of children may be controlled through {@link View#setLayerType(int, Paint)}.
     */
    @Deprecated
    @InspectableProperty(name = "animationCache")
    public boolean isAnimationCacheEnabled() {
        return (mGroupFlags & FLAG_ANIMATION_CACHE) == FLAG_ANIMATION_CACHE;
    }
@@ -6396,6 +6410,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     * Child views may no longer have their caching behavior disabled by parents.
     */
    @Deprecated
    @InspectableProperty(name = "alwaysDrawnWithCache")
    public boolean isAlwaysDrawnWithCacheEnabled() {
        return (mGroupFlags & FLAG_ALWAYS_DRAWN_WITH_CACHE) == FLAG_ALWAYS_DRAWN_WITH_CACHE;
    }
@@ -6539,6 +6554,12 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        @ViewDebug.IntToString(from = PERSISTENT_SCROLLING_CACHE, to = "SCROLLING"),
        @ViewDebug.IntToString(from = PERSISTENT_ALL_CACHES,      to = "ALL")
    })
    @InspectableProperty(enumMapping = {
            @EnumMap(value = PERSISTENT_NO_CACHE, name = "none"),
            @EnumMap(value = PERSISTENT_ANIMATION_CACHE, name = "animation"),
            @EnumMap(value = PERSISTENT_SCROLLING_CACHE, name = "scrolling"),
            @EnumMap(value = PERSISTENT_ALL_CACHES, name = "all"),
    })
    public int getPersistentDrawingCache() {
        return mPersistentDrawingCache;
    }
@@ -6616,6 +6637,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     *
     * @see #setLayoutMode(int)
     */
    @InspectableProperty(enumMapping = {
            @EnumMap(value = LAYOUT_MODE_CLIP_BOUNDS, name = "clipBounds"),
            @EnumMap(value = LAYOUT_MODE_OPTICAL_BOUNDS, name = "opticalBounds")
    })
    public int getLayoutMode() {
        if (mLayoutMode == LAYOUT_MODE_UNDEFINED) {
            int inheritedLayoutMode = (mParent instanceof ViewGroup) ?
@@ -7307,6 +7332,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
     * make a group appear to be focused when its child EditText or button
     * is focused.
     */
    @InspectableProperty
    public boolean addStatesFromChildren() {
        return (mGroupFlags & FLAG_ADD_STATES_FROM_CHILDREN) != 0;
    }
+32 −0
Original line number Diff line number Diff line
@@ -82,6 +82,8 @@ import android.view.inputmethod.ExtractedTextRequest;
import android.view.inputmethod.InputConnection;
import android.view.inputmethod.InputContentInfo;
import android.view.inputmethod.InputMethodManager;
import android.view.inspector.InspectableProperty;
import android.view.inspector.InspectableProperty.EnumMap;
import android.widget.RemoteViews.OnClickHandler;

import com.android.internal.R;
@@ -1221,6 +1223,12 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     *
     * @return The current choice mode
     */
    @InspectableProperty(enumMapping = {
            @EnumMap(value = CHOICE_MODE_NONE, name = "none"),
            @EnumMap(value = CHOICE_MODE_SINGLE, name = "singleChoice"),
            @EnumMap(value = CHOICE_MODE_MULTIPLE, name = "multipleChoice"),
            @EnumMap(value = CHOICE_MODE_MULTIPLE_MODAL, name = "multipleChoiceModal")
    })
    public int getChoiceMode() {
        return mChoiceMode;
    }
@@ -1421,6 +1429,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @return true if fast scroll is enabled, false otherwise
     */
    @ViewDebug.ExportedProperty
    @InspectableProperty
    public boolean isFastScrollEnabled() {
        if (mFastScroll == null) {
            return mFastScrollEnabled;
@@ -1485,6 +1494,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @see #setSmoothScrollbarEnabled(boolean)
     */
    @ViewDebug.ExportedProperty
    @InspectableProperty(name = "smoothScrollbar")
    public boolean isSmoothScrollbarEnabled() {
        return mSmoothScrollbarEnabled;
    }
@@ -1620,6 +1630,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @see View#setDrawingCacheEnabled(boolean)
     */
    @ViewDebug.ExportedProperty
    @InspectableProperty(name = "scrollingCache")
    public boolean isScrollingCacheEnabled() {
        return mScrollingCacheEnabled;
    }
@@ -1667,6 +1678,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @see Filterable
     */
    @ViewDebug.ExportedProperty
    @InspectableProperty
    public boolean isTextFilterEnabled() {
        return mTextFilterEnabled;
    }
@@ -1697,6 +1709,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @return true if the content is stacked from the bottom edge, false otherwise
     */
    @ViewDebug.ExportedProperty
    @InspectableProperty
    public boolean isStackFromBottom() {
        return mStackFromBottom;
    }
@@ -2812,6 +2825,18 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        mDrawSelectorOnTop = onTop;
    }

    /**
     * Returns whether the selection highlight drawable should be drawn on top of the item or
     * behind it.
     *
     * @return true if selector is drawn on top, false otherwise
     * @attr ref android.R.styleable#AbsListView_drawSelectorOnTop
     */
    @InspectableProperty
    public boolean getDrawSelectorOnTop() {
        return mDrawSelectorOnTop;
    }

    /**
     * Set a Drawable that should be used to highlight the currently selected item.
     *
@@ -2845,6 +2870,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     *
     * @return the drawable used to display the selector
     */
    @InspectableProperty(name = "listSelector")
    public Drawable getSelector() {
        return mSelector;
    }
@@ -6272,6 +6298,11 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @return {@link #TRANSCRIPT_MODE_DISABLED}, {@link #TRANSCRIPT_MODE_NORMAL} or
     *         {@link #TRANSCRIPT_MODE_ALWAYS_SCROLL}
     */
    @InspectableProperty(enumMapping = {
            @EnumMap(value = TRANSCRIPT_MODE_DISABLED, name = "disabled"),
            @EnumMap(value = TRANSCRIPT_MODE_NORMAL, name = "normal"),
            @EnumMap(value = TRANSCRIPT_MODE_ALWAYS_SCROLL, name = "alwaysScroll")
    })
    public int getTranscriptMode() {
        return mTranscriptMode;
    }
@@ -6309,6 +6340,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @return The cache color hint
     */
    @ViewDebug.ExportedProperty(category = "drawing")
    @InspectableProperty
    @ColorInt
    public int getCacheColorHint() {
        return mCacheColorHint;
Loading