Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -51682,6 +51682,7 @@ package android.view { method public boolean isScrollContainer(); method public boolean isScrollbarFadingEnabled(); method @android.view.ViewDebug.ExportedProperty public boolean isSelected(); method public final boolean isShowingLayoutBounds(); method public boolean isShown(); method @android.view.ViewDebug.ExportedProperty public boolean isSoundEffectsEnabled(); method public final boolean isTemporarilyDetached(); api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -4359,6 +4359,7 @@ package android.view { method public void setAutofilled(boolean); method public final void setFocusedInCluster(); method public void setIsRootNamespace(boolean); method public final void setShowingLayoutBounds(boolean); } public class ViewConfiguration { Loading core/java/android/view/View.java +21 −4 Original line number Diff line number Diff line Loading @@ -6162,10 +6162,27 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mRenderNode = RenderNode.create(getClass().getName(), new ViewAnimationHostBridge(this)); } final boolean debugDraw() { /** * Returns {@code true} when the View is attached and the system developer setting to show * the layout bounds is enabled or {@code false} otherwise. */ public final boolean isShowingLayoutBounds() { return DEBUG_DRAW || mAttachInfo != null && mAttachInfo.mDebugLayout; } /** * Used to test isShowingLayoutBounds(). This sets the local value used * by that function. This method does nothing if the layout isn't attached. * * @hide */ @TestApi public final void setShowingLayoutBounds(boolean debugLayout) { if (mAttachInfo != null) { mAttachInfo.mDebugLayout = debugLayout; } } private static SparseArray<String> getAttributeMap() { if (mAttributeMap == null) { mAttributeMap = new SparseArray<>(); Loading Loading @@ -20881,7 +20898,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().draw(canvas); } if (debugDraw()) { if (isShowingLayoutBounds()) { debugDrawFocus(canvas); } } else { Loading Loading @@ -22026,7 +22043,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Step 7, draw the default focus highlight drawDefaultFocusHighlight(canvas); if (debugDraw()) { if (isShowingLayoutBounds()) { debugDrawFocus(canvas); } Loading Loading @@ -22201,7 +22218,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Step 6, draw decorations (foreground, scrollbars) onDrawForeground(canvas); if (debugDraw()) { if (isShowingLayoutBounds()) { debugDrawFocus(canvas); } } core/java/android/view/ViewGroup.java +2 −2 Original line number Diff line number Diff line Loading @@ -681,7 +681,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager private void initViewGroup() { // ViewGroup doesn't draw by default if (!debugDraw()) { if (!isShowingLayoutBounds()) { setFlags(WILL_NOT_DRAW, DRAW_MASK); } mGroupFlags |= FLAG_CLIP_CHILDREN; Loading Loading @@ -4156,7 +4156,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } if (usingRenderNodeProperties) canvas.insertInorderBarrier(); if (debugDraw()) { if (isShowingLayoutBounds()) { onDebugDraw(canvas); } Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -51682,6 +51682,7 @@ package android.view { method public boolean isScrollContainer(); method public boolean isScrollbarFadingEnabled(); method @android.view.ViewDebug.ExportedProperty public boolean isSelected(); method public final boolean isShowingLayoutBounds(); method public boolean isShown(); method @android.view.ViewDebug.ExportedProperty public boolean isSoundEffectsEnabled(); method public final boolean isTemporarilyDetached();
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -4359,6 +4359,7 @@ package android.view { method public void setAutofilled(boolean); method public final void setFocusedInCluster(); method public void setIsRootNamespace(boolean); method public final void setShowingLayoutBounds(boolean); } public class ViewConfiguration { Loading
core/java/android/view/View.java +21 −4 Original line number Diff line number Diff line Loading @@ -6162,10 +6162,27 @@ public class View implements Drawable.Callback, KeyEvent.Callback, mRenderNode = RenderNode.create(getClass().getName(), new ViewAnimationHostBridge(this)); } final boolean debugDraw() { /** * Returns {@code true} when the View is attached and the system developer setting to show * the layout bounds is enabled or {@code false} otherwise. */ public final boolean isShowingLayoutBounds() { return DEBUG_DRAW || mAttachInfo != null && mAttachInfo.mDebugLayout; } /** * Used to test isShowingLayoutBounds(). This sets the local value used * by that function. This method does nothing if the layout isn't attached. * * @hide */ @TestApi public final void setShowingLayoutBounds(boolean debugLayout) { if (mAttachInfo != null) { mAttachInfo.mDebugLayout = debugLayout; } } private static SparseArray<String> getAttributeMap() { if (mAttributeMap == null) { mAttributeMap = new SparseArray<>(); Loading Loading @@ -20881,7 +20898,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().draw(canvas); } if (debugDraw()) { if (isShowingLayoutBounds()) { debugDrawFocus(canvas); } } else { Loading Loading @@ -22026,7 +22043,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Step 7, draw the default focus highlight drawDefaultFocusHighlight(canvas); if (debugDraw()) { if (isShowingLayoutBounds()) { debugDrawFocus(canvas); } Loading Loading @@ -22201,7 +22218,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Step 6, draw decorations (foreground, scrollbars) onDrawForeground(canvas); if (debugDraw()) { if (isShowingLayoutBounds()) { debugDrawFocus(canvas); } }
core/java/android/view/ViewGroup.java +2 −2 Original line number Diff line number Diff line Loading @@ -681,7 +681,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager private void initViewGroup() { // ViewGroup doesn't draw by default if (!debugDraw()) { if (!isShowingLayoutBounds()) { setFlags(WILL_NOT_DRAW, DRAW_MASK); } mGroupFlags |= FLAG_CLIP_CHILDREN; Loading Loading @@ -4156,7 +4156,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } if (usingRenderNodeProperties) canvas.insertInorderBarrier(); if (debugDraw()) { if (isShowingLayoutBounds()) { onDebugDraw(canvas); } Loading