-
public class ViewGroupDrawingOrderHelper
Helper to handle implementing ViewGroups with custom drawing order based on z-index.
-
-
Constructor Summary
Constructors Constructor Description ViewGroupDrawingOrderHelper(ViewGroup viewGroup)
-
Method Summary
Modifier and Type Method Description void
handleAddView(View view)
This should be called every time a view is added to the ViewGroup in addView. void
handleRemoveView(View view)
This should be called every time a view is removed from the ViewGroup in and removeViewAt. boolean
shouldEnableCustomDrawingOrder()
If the ViewGroup should enable drawing order. int
getChildDrawingOrder(int childCount, int index)
The index of the child view that should be drawn. void
update()
Recheck all children for z-index changes. -
-
Constructor Detail
-
ViewGroupDrawingOrderHelper
ViewGroupDrawingOrderHelper(ViewGroup viewGroup)
-
-
Method Detail
-
handleAddView
void handleAddView(View view)
This should be called every time a view is added to the ViewGroup in addView.
- Parameters:
view
- The view that is being added
-
handleRemoveView
void handleRemoveView(View view)
This should be called every time a view is removed from the ViewGroup in and removeViewAt.
- Parameters:
view
- The view that is being removed.
-
shouldEnableCustomDrawingOrder
boolean shouldEnableCustomDrawingOrder()
-
getChildDrawingOrder
int getChildDrawingOrder(int childCount, int index)
The index of the child view that should be drawn. This should be used in .
-
update
void update()
Recheck all children for z-index changes.
-
-
-
-