I want to fade from one view to another on in a ViewGroup
.
At the moment I'm doing the transition using setAlpha
, but the problem is that only one view is being rendered, the one that was on top and is fading out.
- Is the view-array inside
ViewGroup
an order by z-axis? - Is only the top view being rendered?
My layout
method looks like this:
@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());
}
}