diff --git a/api/current.txt b/api/current.txt index 94d946e2a94b2..6fbeeef408788 100644 --- a/api/current.txt +++ b/api/current.txt @@ -289,6 +289,7 @@ package android { field public static final int allowAudioPlaybackCapture = 16844289; // 0x1010601 field public static final int allowBackup = 16843392; // 0x1010280 field public static final int allowClearUserData = 16842757; // 0x1010005 + field public static final int allowClickWhenDisabled = 16844325; // 0x1010625 field public static final int allowEmbedded = 16843765; // 0x10103f5 field public static final int allowNativeHeapPointerTagging = 16844307; // 0x1010613 field public static final int allowParallelSyncs = 16843570; // 0x1010332 diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 1136dc6e55892..b1dded0eca62d 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -728,6 +728,7 @@ import java.util.function.Predicate; *
* * @attr ref android.R.styleable#View_accessibilityHeading + * @attr ref android.R.styleable#View_allowClickWhenDisabled * @attr ref android.R.styleable#View_alpha * @attr ref android.R.styleable#View_background * @attr ref android.R.styleable#View_clickable @@ -5598,6 +5599,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, viewFlagMasks |= CLICKABLE; } break; + case com.android.internal.R.styleable.View_allowClickWhenDisabled: + setAllowClickWhenDisabled(a.getBoolean(attr, false)); + break; case com.android.internal.R.styleable.View_longClickable: if (a.getBoolean(attr, false)) { viewFlagValues |= LONG_CLICKABLE; @@ -12152,6 +12156,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * Enables or disables click events for this view when disabled. * * @param clickableWhenDisabled true to make the view clickable, false otherwise + * + * @attr ref android.R.styleable#View_allowClickWhenDisabled */ public void setAllowClickWhenDisabled(boolean clickableWhenDisabled) { if (clickableWhenDisabled) { diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 4065a6c83f8f4..8d867428cc5d9 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -3182,6 +3182,9 @@