【发布时间】:2011-06-29 16:02:24
【问题描述】:
我有两个片段,称为 frag1 和 frag2,它们处于水平方向的线性布局中。
我想让 frag2 看起来隐藏在 frag1 后面,然后以新的内容重新出现。是否可以设置 z-order 或类似的东西,以便我可以使用一个简单的 ObjectAnimator 来改变 translationX?
ObjectAnimator right = ObjectAnimator.ofFloat(details, "translationX", start, details.getWidth()+start);
right.setDuration(duration);
right.setRepeatCount(1);
right.setRepeatMode(ObjectAnimator.REVERSE);
right.start();
以上工作正常,但 frag2(细节)移动到 frag1 前面。我想要它在后面。
【问题讨论】:
标签: android android-3.0-honeycomb