Loading api/current.xml +24 −11 Original line number Diff line number Diff line Loading @@ -162753,6 +162753,17 @@ visibility="public" > </method> <method name="isChildrenDrawingOrderEnabled" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="protected" > </method> <method name="isChildrenDrawnWithCacheEnabled" return="boolean" abstract="false" Loading Loading @@ -163136,6 +163147,19 @@ <parameter name="enabled" type="boolean"> </parameter> </method> <method name="setChildrenDrawingOrderEnabled" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="protected" > <parameter name="enabled" type="boolean"> </parameter> </method> <method name="setChildrenDrawnWithCacheEnabled" return="void" abstract="false" Loading Loading @@ -163303,17 +163327,6 @@ visibility="protected" > </field> <field name="FLAG_USE_CHILD_DRAWING_ORDER" type="int" transient="false" volatile="false" value="1024" static="true" final="true" deprecated="not deprecated" visibility="protected" > </field> <field name="FOCUS_AFTER_DESCENDANTS" type="int" transient="false" core/java/android/view/ViewGroup.java +36 −2 Original line number Diff line number Diff line Loading @@ -150,6 +150,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * When set, the drawing method will call {@link #getChildDrawingOrder(int, int)} * to get the index of the child to draw for that iteration. * * @hide */ protected static final int FLAG_USE_CHILD_DRAWING_ORDER = 0x400; Loading Loading @@ -1307,11 +1309,14 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * if you want to change the drawing order of children. By default, it * returns i. * <p> * NOTE: In order for this method to be called, the * {@link #FLAG_USE_CHILD_DRAWING_ORDER} must be set. * NOTE: In order for this method to be called, you must enable child ordering * first by calling {@link #setChildrenDrawingOrderEnabled(boolean)}. * * @param i The current iteration. * @return The index of the child to draw this iteration. * * @see #setChildrenDrawingOrderEnabled(boolean) * @see #isChildrenDrawingOrderEnabled() */ protected int getChildDrawingOrder(int childCount, int i) { return i; Loading Loading @@ -2706,6 +2711,35 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager setBooleanFlag(FLAG_CHILDREN_DRAWN_WITH_CACHE, enabled); } /** * Indicates whether the ViewGroup is drawing its children in the order defined by * {@link #getChildDrawingOrder(int, int)}. * * @return true if children drawing order is defined by {@link #getChildDrawingOrder(int, int)}, * false otherwise * * @see #setChildrenDrawingOrderEnabled(boolean) * @see #getChildDrawingOrder(int, int) */ @ViewDebug.ExportedProperty protected boolean isChildrenDrawingOrderEnabled() { return (mGroupFlags & FLAG_USE_CHILD_DRAWING_ORDER) == FLAG_USE_CHILD_DRAWING_ORDER; } /** * Tells the ViewGroup whether to draw its children in the order defined by the method * {@link #getChildDrawingOrder(int, int)}. * * @param enabled true if the order of the children when drawing is determined by * {@link #getChildDrawingOrder(int, int)}, false otherwise * * @see #isChildrenDrawingOrderEnabled() * @see #getChildDrawingOrder(int, int) */ protected void setChildrenDrawingOrderEnabled(boolean enabled) { setBooleanFlag(FLAG_USE_CHILD_DRAWING_ORDER, enabled); } private void setBooleanFlag(int flag, boolean value) { if (value) { mGroupFlags |= flag; Loading Loading
api/current.xml +24 −11 Original line number Diff line number Diff line Loading @@ -162753,6 +162753,17 @@ visibility="public" > </method> <method name="isChildrenDrawingOrderEnabled" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="protected" > </method> <method name="isChildrenDrawnWithCacheEnabled" return="boolean" abstract="false" Loading Loading @@ -163136,6 +163147,19 @@ <parameter name="enabled" type="boolean"> </parameter> </method> <method name="setChildrenDrawingOrderEnabled" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="protected" > <parameter name="enabled" type="boolean"> </parameter> </method> <method name="setChildrenDrawnWithCacheEnabled" return="void" abstract="false" Loading Loading @@ -163303,17 +163327,6 @@ visibility="protected" > </field> <field name="FLAG_USE_CHILD_DRAWING_ORDER" type="int" transient="false" volatile="false" value="1024" static="true" final="true" deprecated="not deprecated" visibility="protected" > </field> <field name="FOCUS_AFTER_DESCENDANTS" type="int" transient="false"
core/java/android/view/ViewGroup.java +36 −2 Original line number Diff line number Diff line Loading @@ -150,6 +150,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager /** * When set, the drawing method will call {@link #getChildDrawingOrder(int, int)} * to get the index of the child to draw for that iteration. * * @hide */ protected static final int FLAG_USE_CHILD_DRAWING_ORDER = 0x400; Loading Loading @@ -1307,11 +1309,14 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager * if you want to change the drawing order of children. By default, it * returns i. * <p> * NOTE: In order for this method to be called, the * {@link #FLAG_USE_CHILD_DRAWING_ORDER} must be set. * NOTE: In order for this method to be called, you must enable child ordering * first by calling {@link #setChildrenDrawingOrderEnabled(boolean)}. * * @param i The current iteration. * @return The index of the child to draw this iteration. * * @see #setChildrenDrawingOrderEnabled(boolean) * @see #isChildrenDrawingOrderEnabled() */ protected int getChildDrawingOrder(int childCount, int i) { return i; Loading Loading @@ -2706,6 +2711,35 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager setBooleanFlag(FLAG_CHILDREN_DRAWN_WITH_CACHE, enabled); } /** * Indicates whether the ViewGroup is drawing its children in the order defined by * {@link #getChildDrawingOrder(int, int)}. * * @return true if children drawing order is defined by {@link #getChildDrawingOrder(int, int)}, * false otherwise * * @see #setChildrenDrawingOrderEnabled(boolean) * @see #getChildDrawingOrder(int, int) */ @ViewDebug.ExportedProperty protected boolean isChildrenDrawingOrderEnabled() { return (mGroupFlags & FLAG_USE_CHILD_DRAWING_ORDER) == FLAG_USE_CHILD_DRAWING_ORDER; } /** * Tells the ViewGroup whether to draw its children in the order defined by the method * {@link #getChildDrawingOrder(int, int)}. * * @param enabled true if the order of the children when drawing is determined by * {@link #getChildDrawingOrder(int, int)}, false otherwise * * @see #isChildrenDrawingOrderEnabled() * @see #getChildDrawingOrder(int, int) */ protected void setChildrenDrawingOrderEnabled(boolean enabled) { setBooleanFlag(FLAG_USE_CHILD_DRAWING_ORDER, enabled); } private void setBooleanFlag(int flag, boolean value) { if (value) { mGroupFlags |= flag; Loading