Package 

Interface RecyclerView.ChildDrawingOrderCallback


  • 
    public interface RecyclerView.ChildDrawingOrderCallback
    
                        

    A callback interface that can be used to alter the drawing order of RecyclerView children.

    It works using the getChildDrawingOrder method, so any casethat applies to that method also applies to this callback. For example, changing the drawingorder of two views will not have any effect if their elevation values are different sinceelevation overrides the result of this callback.

    • Method Summary

      Modifier and Type Method Description
      abstract int onGetChildDrawingOrder(int childCount, int i) Returns the index of the child to draw for this iteration.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • onGetChildDrawingOrder

         abstract int onGetChildDrawingOrder(int childCount, int i)

        Returns the index of the child to draw for this iteration. Override thisif you want to change the drawing order of children. By default, itreturns i.

        Parameters:
        i - The current iteration.