private void sortChildDrawingOrder(){
  if (drawingOrderedChildren == null) {
    drawingOrderedChildren=new ArrayList<>();
  }
 else {
    drawingOrderedChildren.clear();
  }
  final int childCount=getChildCount();
  for (int i=0; i < childCount; i++) {
    final View child=getChildAt(i);
    drawingOrderedChildren.add(child);
  }
  Collections.sort(drawingOrderedChildren,VIEW_COMPARATOR);
}

private void sortChildDrawingOrder ( ) { if ( drawingOrderedChildren == null ) { drawingOrderedChildren = new ArrayList < > ( ) ; } else { drawingOrderedChildren . clear ( ) ; } final int childCount = getChildCount ( ) ; for ( int i = 0 ; i < childCount ; i ++ ) { final View child = getChildAt ( i ) ; drawingOrderedChildren . add ( child ) ; } Collections . sort ( drawingOrderedChildren , VIEW_COMPARATOR ) ; }
sorts children in reverse order for drawing .
