android 5.0 要支持 z 轴效果,view 的先后顺序就得随着 z 轴上的位置可以动态的调整,view 先后位置的确定是怎么计算的呢,可以看看
ViewGroup 里面的 buildOrderedChildList 这个方法
/**
* Populates (and returns) mPreSortedChildren with a pre-ordered list of the View's children, sorted first by Z, then by child drawing order (if applicable). This list must be cleared after use to avoid leaking child Views. Uses a stable, insertion sort which is commonly O(n) for ViewGroups with very few elevated children.
*/
ArrayList<View> buildOrderedChildList() {
final int count = mChildrenCount;
if (count <= 1 || !hasChildWithZ()) return null;
if<