我想在ViewGroup
. 目前我正在使用 进行过渡setAlpha
,但问题是只呈现一个视图,即位于顶部且正在淡出的视图。
- 视图数组是否
ViewGroup
按 z 轴排列? - 只渲染顶视图吗?
我的layout
方法如下所示:
@Override
protected void onLayout(final boolean changed, final int l, final int t, final int r, final int b) {
L.debug("laying out {} children", this.getChildCount());
for (int i = 0; i < this.getChildCount(); i++) {
L.debug("layout out {}", i);
View view = this.getChildAt(0);
view.layout(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
}
}