MCPcopy Create free account
hub / github.com/OneUIProject/oneui-core / ViewCompat

Class ViewCompat

core/src/main/java/androidx/core/view/ViewCompat.java:96–4876  ·  view source on GitHub ↗

Helper for accessing features in View.

Source from the content-addressed store, hash-verified

94 * Helper for accessing features in {@link View}.
95 */
96@SuppressLint("PrivateConstructorForUtilityClass") // deprecated non-private constructor
97public class ViewCompat {
98 private static final String TAG = "ViewCompat";
99
100 /** @hide */
101 @RestrictTo(LIBRARY_GROUP_PREFIX)
102 @IntDef({View.FOCUS_LEFT, View.FOCUS_UP, View.FOCUS_RIGHT, View.FOCUS_DOWN,
103 View.FOCUS_FORWARD, View.FOCUS_BACKWARD})
104 @Retention(RetentionPolicy.SOURCE)
105 public @interface FocusDirection {}
106
107 /** @hide */
108 @RestrictTo(LIBRARY_GROUP_PREFIX)
109 @IntDef({View.FOCUS_LEFT, View.FOCUS_UP, View.FOCUS_RIGHT, View.FOCUS_DOWN})
110 @Retention(RetentionPolicy.SOURCE)
111 public @interface FocusRealDirection {}
112
113 /** @hide */
114 @RestrictTo(LIBRARY_GROUP_PREFIX)
115 @IntDef({View.FOCUS_FORWARD, View.FOCUS_BACKWARD})
116 @Retention(RetentionPolicy.SOURCE)
117 public @interface FocusRelativeDirection {}
118
119 @IntDef({OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER})
120 @Retention(RetentionPolicy.SOURCE)
121 private @interface OverScroll {}
122
123 /**
124 * Always allow a user to over-scroll this view, provided it is a
125 * view that can scroll.
126 * @deprecated Use {@link View#OVER_SCROLL_ALWAYS} directly. This constant will be removed in
127 * a future release.
128 */
129 @Deprecated
130 public static final int OVER_SCROLL_ALWAYS = 0;
131
132 /**
133 * Allow a user to over-scroll this view only if the content is large
134 * enough to meaningfully scroll, provided it is a view that can scroll.
135 * @deprecated Use {@link View#OVER_SCROLL_IF_CONTENT_SCROLLS} directly. This constant will be
136 * removed in a future release.
137 */
138 @Deprecated
139 public static final int OVER_SCROLL_IF_CONTENT_SCROLLS = 1;
140
141 /**
142 * Never allow a user to over-scroll this view.
143 * @deprecated Use {@link View#OVER_SCROLL_NEVER} directly. This constant will be removed in
144 * a future release.
145 */
146 @Deprecated
147 public static final int OVER_SCROLL_NEVER = 2;
148
149 @RequiresApi(Build.VERSION_CODES.O)
150 @IntDef({
151 View.IMPORTANT_FOR_AUTOFILL_AUTO,
152 View.IMPORTANT_FOR_AUTOFILL_YES,
153 View.IMPORTANT_FOR_AUTOFILL_NO,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected