Loading api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -471,6 +471,7 @@ package android { field public static final deprecated int dayOfWeekBackground = 16843924; // 0x1010494 field public static final deprecated int dayOfWeekTextAppearance = 16843925; // 0x1010495 field public static final int debuggable = 16842767; // 0x101000f field public static final int defaultFocusHighlightEnabled = 16844133; // 0x1010565 field public static final int defaultHeight = 16844021; // 0x10104f5 field public static final int defaultToDeviceProtectedStorage = 16844036; // 0x1010504 field public static final int defaultValue = 16843245; // 0x10101ed Loading Loading @@ -45341,6 +45342,7 @@ package android.view { method public java.lang.CharSequence getContentDescription(); method public final android.content.Context getContext(); method protected android.view.ContextMenu.ContextMenuInfo getContextMenuInfo(); method public final boolean getDefaultFocusHighlightEnabled(); method public static int getDefaultSize(int, int); method public android.view.Display getDisplay(); method public final int[] getDrawableState(); Loading Loading @@ -45659,6 +45661,7 @@ package android.view { method public void setClipToOutline(boolean); method public void setContentDescription(java.lang.CharSequence); method public void setContextClickable(boolean); method public void setDefaultFocusHighlightEnabled(boolean); method public void setDrawingCacheBackgroundColor(int); method public void setDrawingCacheEnabled(boolean); method public void setDrawingCacheQuality(int); api/system-current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -587,6 +587,7 @@ package android { field public static final deprecated int dayOfWeekBackground = 16843924; // 0x1010494 field public static final deprecated int dayOfWeekTextAppearance = 16843925; // 0x1010495 field public static final int debuggable = 16842767; // 0x101000f field public static final int defaultFocusHighlightEnabled = 16844133; // 0x1010565 field public static final int defaultHeight = 16844021; // 0x10104f5 field public static final int defaultToDeviceProtectedStorage = 16844036; // 0x1010504 field public static final int defaultValue = 16843245; // 0x10101ed Loading Loading @@ -48898,6 +48899,7 @@ package android.view { method public java.lang.CharSequence getContentDescription(); method public final android.content.Context getContext(); method protected android.view.ContextMenu.ContextMenuInfo getContextMenuInfo(); method public final boolean getDefaultFocusHighlightEnabled(); method public static int getDefaultSize(int, int); method public android.view.Display getDisplay(); method public final int[] getDrawableState(); Loading Loading @@ -49216,6 +49218,7 @@ package android.view { method public void setClipToOutline(boolean); method public void setContentDescription(java.lang.CharSequence); method public void setContextClickable(boolean); method public void setDefaultFocusHighlightEnabled(boolean); method public void setDrawingCacheBackgroundColor(int); method public void setDrawingCacheEnabled(boolean); method public void setDrawingCacheQuality(int); api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -471,6 +471,7 @@ package android { field public static final deprecated int dayOfWeekBackground = 16843924; // 0x1010494 field public static final deprecated int dayOfWeekTextAppearance = 16843925; // 0x1010495 field public static final int debuggable = 16842767; // 0x101000f field public static final int defaultFocusHighlightEnabled = 16844133; // 0x1010565 field public static final int defaultHeight = 16844021; // 0x10104f5 field public static final int defaultToDeviceProtectedStorage = 16844036; // 0x1010504 field public static final int defaultValue = 16843245; // 0x10101ed Loading Loading @@ -14023,6 +14024,7 @@ package android.graphics.drawable { method public boolean getPadding(android.graphics.Rect); method public int[] getState(); method public android.graphics.Region getTransparentRegion(); method public boolean hasFocusStateSpecified(); method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public void invalidateSelf(); Loading Loading @@ -45729,6 +45731,7 @@ package android.view { method public java.lang.CharSequence getContentDescription(); method public final android.content.Context getContext(); method protected android.view.ContextMenu.ContextMenuInfo getContextMenuInfo(); method public final boolean getDefaultFocusHighlightEnabled(); method public static int getDefaultSize(int, int); method public android.view.Display getDisplay(); method public final int[] getDrawableState(); Loading Loading @@ -46051,6 +46054,7 @@ package android.view { method public void setClipToOutline(boolean); method public void setContentDescription(java.lang.CharSequence); method public void setContextClickable(boolean); method public void setDefaultFocusHighlightEnabled(boolean); method public void setDrawingCacheBackgroundColor(int); method public void setDrawingCacheEnabled(boolean); method public void setDrawingCacheQuality(int); core/java/android/view/View.java +38 −0 Original line number Diff line number Diff line Loading @@ -4102,6 +4102,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ int mNextClusterForwardId = View.NO_ID; /** * Whether this View should use a default focus highlight when it gets focused but doesn't * have {@link android.R.attr#state_focused} defined in its background. */ boolean mDefaultFocusHighlightEnabled = true; private CheckForLongPress mPendingCheckForLongPress; private CheckForTap mPendingCheckForTap = null; private PerformClick mPerformClick; Loading Loading @@ -5086,6 +5092,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, setImportantForAutofill(a.getInt(attr, IMPORTANT_FOR_AUTOFILL_AUTO)); } break; case R.styleable.View_defaultFocusHighlightEnabled: if (a.peekValue(attr) != null) { setDefaultFocusHighlightEnabled(a.getBoolean(attr, true)); } break; } } Loading Loading @@ -9985,6 +9996,33 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return false; } /** * Sets whether this View should use a default focus highlight when it gets focused but doesn't * have {@link android.R.attr#state_focused} defined in its background. * * @param defaultFocusHighlightEnabled {@code true} to set this view to use a default focus * highlight, {@code false} otherwise. * * @attr ref android.R.styleable#View_defaultFocusHighlightEnabled */ public void setDefaultFocusHighlightEnabled(boolean defaultFocusHighlightEnabled) { mDefaultFocusHighlightEnabled = defaultFocusHighlightEnabled; } /** /** * Returns whether this View should use a default focus highlight when it gets focused but * doesn't have {@link android.R.attr#state_focused} defined in its background. * * @return True if this View should use a default focus highlight. * @attr ref android.R.styleable#View_defaultFocusHighlightEnabled */ @ViewDebug.ExportedProperty(category = "defaultFocusHighlightEnabled") public final boolean getDefaultFocusHighlightEnabled() { return mDefaultFocusHighlightEnabled; } /** * If a user manually specified the next view id for a particular direction, * use the root to look up the view. Loading core/res/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2953,6 +2953,9 @@ See {@link android.view.View#setFocusedByDefault(boolean)}. --> <attr name="focusedByDefault" format="boolean" /> <!-- Whether this View should use a default focus highlight when it gets focused but doesn't have {@link android.R.attr#state_focused} defined in its background. --> <attr name="defaultFocusHighlightEnabled" format="boolean" /> </declare-styleable> <!-- Attributes that can be assigned to a tag for a particular View. --> Loading Loading
api/current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -471,6 +471,7 @@ package android { field public static final deprecated int dayOfWeekBackground = 16843924; // 0x1010494 field public static final deprecated int dayOfWeekTextAppearance = 16843925; // 0x1010495 field public static final int debuggable = 16842767; // 0x101000f field public static final int defaultFocusHighlightEnabled = 16844133; // 0x1010565 field public static final int defaultHeight = 16844021; // 0x10104f5 field public static final int defaultToDeviceProtectedStorage = 16844036; // 0x1010504 field public static final int defaultValue = 16843245; // 0x10101ed Loading Loading @@ -45341,6 +45342,7 @@ package android.view { method public java.lang.CharSequence getContentDescription(); method public final android.content.Context getContext(); method protected android.view.ContextMenu.ContextMenuInfo getContextMenuInfo(); method public final boolean getDefaultFocusHighlightEnabled(); method public static int getDefaultSize(int, int); method public android.view.Display getDisplay(); method public final int[] getDrawableState(); Loading Loading @@ -45659,6 +45661,7 @@ package android.view { method public void setClipToOutline(boolean); method public void setContentDescription(java.lang.CharSequence); method public void setContextClickable(boolean); method public void setDefaultFocusHighlightEnabled(boolean); method public void setDrawingCacheBackgroundColor(int); method public void setDrawingCacheEnabled(boolean); method public void setDrawingCacheQuality(int);
api/system-current.txt +3 −0 Original line number Diff line number Diff line Loading @@ -587,6 +587,7 @@ package android { field public static final deprecated int dayOfWeekBackground = 16843924; // 0x1010494 field public static final deprecated int dayOfWeekTextAppearance = 16843925; // 0x1010495 field public static final int debuggable = 16842767; // 0x101000f field public static final int defaultFocusHighlightEnabled = 16844133; // 0x1010565 field public static final int defaultHeight = 16844021; // 0x10104f5 field public static final int defaultToDeviceProtectedStorage = 16844036; // 0x1010504 field public static final int defaultValue = 16843245; // 0x10101ed Loading Loading @@ -48898,6 +48899,7 @@ package android.view { method public java.lang.CharSequence getContentDescription(); method public final android.content.Context getContext(); method protected android.view.ContextMenu.ContextMenuInfo getContextMenuInfo(); method public final boolean getDefaultFocusHighlightEnabled(); method public static int getDefaultSize(int, int); method public android.view.Display getDisplay(); method public final int[] getDrawableState(); Loading Loading @@ -49216,6 +49218,7 @@ package android.view { method public void setClipToOutline(boolean); method public void setContentDescription(java.lang.CharSequence); method public void setContextClickable(boolean); method public void setDefaultFocusHighlightEnabled(boolean); method public void setDrawingCacheBackgroundColor(int); method public void setDrawingCacheEnabled(boolean); method public void setDrawingCacheQuality(int);
api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -471,6 +471,7 @@ package android { field public static final deprecated int dayOfWeekBackground = 16843924; // 0x1010494 field public static final deprecated int dayOfWeekTextAppearance = 16843925; // 0x1010495 field public static final int debuggable = 16842767; // 0x101000f field public static final int defaultFocusHighlightEnabled = 16844133; // 0x1010565 field public static final int defaultHeight = 16844021; // 0x10104f5 field public static final int defaultToDeviceProtectedStorage = 16844036; // 0x1010504 field public static final int defaultValue = 16843245; // 0x10101ed Loading Loading @@ -14023,6 +14024,7 @@ package android.graphics.drawable { method public boolean getPadding(android.graphics.Rect); method public int[] getState(); method public android.graphics.Region getTransparentRegion(); method public boolean hasFocusStateSpecified(); method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; method public void invalidateSelf(); Loading Loading @@ -45729,6 +45731,7 @@ package android.view { method public java.lang.CharSequence getContentDescription(); method public final android.content.Context getContext(); method protected android.view.ContextMenu.ContextMenuInfo getContextMenuInfo(); method public final boolean getDefaultFocusHighlightEnabled(); method public static int getDefaultSize(int, int); method public android.view.Display getDisplay(); method public final int[] getDrawableState(); Loading Loading @@ -46051,6 +46054,7 @@ package android.view { method public void setClipToOutline(boolean); method public void setContentDescription(java.lang.CharSequence); method public void setContextClickable(boolean); method public void setDefaultFocusHighlightEnabled(boolean); method public void setDrawingCacheBackgroundColor(int); method public void setDrawingCacheEnabled(boolean); method public void setDrawingCacheQuality(int);
core/java/android/view/View.java +38 −0 Original line number Diff line number Diff line Loading @@ -4102,6 +4102,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ int mNextClusterForwardId = View.NO_ID; /** * Whether this View should use a default focus highlight when it gets focused but doesn't * have {@link android.R.attr#state_focused} defined in its background. */ boolean mDefaultFocusHighlightEnabled = true; private CheckForLongPress mPendingCheckForLongPress; private CheckForTap mPendingCheckForTap = null; private PerformClick mPerformClick; Loading Loading @@ -5086,6 +5092,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, setImportantForAutofill(a.getInt(attr, IMPORTANT_FOR_AUTOFILL_AUTO)); } break; case R.styleable.View_defaultFocusHighlightEnabled: if (a.peekValue(attr) != null) { setDefaultFocusHighlightEnabled(a.getBoolean(attr, true)); } break; } } Loading Loading @@ -9985,6 +9996,33 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return false; } /** * Sets whether this View should use a default focus highlight when it gets focused but doesn't * have {@link android.R.attr#state_focused} defined in its background. * * @param defaultFocusHighlightEnabled {@code true} to set this view to use a default focus * highlight, {@code false} otherwise. * * @attr ref android.R.styleable#View_defaultFocusHighlightEnabled */ public void setDefaultFocusHighlightEnabled(boolean defaultFocusHighlightEnabled) { mDefaultFocusHighlightEnabled = defaultFocusHighlightEnabled; } /** /** * Returns whether this View should use a default focus highlight when it gets focused but * doesn't have {@link android.R.attr#state_focused} defined in its background. * * @return True if this View should use a default focus highlight. * @attr ref android.R.styleable#View_defaultFocusHighlightEnabled */ @ViewDebug.ExportedProperty(category = "defaultFocusHighlightEnabled") public final boolean getDefaultFocusHighlightEnabled() { return mDefaultFocusHighlightEnabled; } /** * If a user manually specified the next view id for a particular direction, * use the root to look up the view. Loading
core/res/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2953,6 +2953,9 @@ See {@link android.view.View#setFocusedByDefault(boolean)}. --> <attr name="focusedByDefault" format="boolean" /> <!-- Whether this View should use a default focus highlight when it gets focused but doesn't have {@link android.R.attr#state_focused} defined in its background. --> <attr name="defaultFocusHighlightEnabled" format="boolean" /> </declare-styleable> <!-- Attributes that can be assigned to a tag for a particular View. --> Loading