Android ViewFlipper ZOrder
我正在尝试使用视图翻转器来制作两个视图之间的过渡动画。默认情况下,ViewFlipper 似乎将 Out 动画按 Z 顺序放置在 In 动画之上。有没有办法让传入的动画显示在传出的动画之上?
谢谢
I am attempting to use a view flipper to animate the transition between 2 views. It seems that, by default, the ViewFlipper places the Out animation above the In animation in Z order. Is there a way to get the incoming animation to display over the outgoing animation?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 Android 启动器中找到此功能。由于 Android 是开源的,您只需复制并使用它即可。
采用名为 DragableSpace 的代码:http://pastebin.com/CgK8TCQS。在您的活动中,您可以调用:
with:
正如您所看到的,您可以仅使用 xml 为应用程序定义主屏幕;)
定义每个视图(初始视图、右视图和左视图)
像这样:
有关更多信息,请查看此问题:开发 Android 主屏幕
You can find this feature in the Android Launcher. Since Android is open source you can just copy and work with it.
Take this code called DragableSpace: http://pastebin.com/CgK8TCQS. In your activity you call:
with:
Like you can see you can define a homescreen for your application using just xml ;)
Define each view (initial, right and left)
like this:
For more information check out this question: Developing an Android Homescreen