如何在android中为左栏菜单设置动画(缩小效果)?
我有以下视图:
------------------------------------
o Menu1 |
@ Menu2 |
# Menu3 | CONTENT
|
|
------------------------------------
我想创建一个动画来缩小菜单栏以仅显示这样的图标:
------------------------------------
o |
@ |
# | CONTENT
|
|
------------------------------------
我已经通过将 Visibility.GONE 应用于文本标签并调整包含菜单的 LinearLayout 的大小来进行更改,但是我想制作“缩小”效果的动画。我尝试沿 x 应用缩放动画,但这不起作用。有人已经做过类似的事情了吗?
I have the following view:
------------------------------------
o Menu1 |
@ Menu2 |
# Menu3 | CONTENT
|
|
------------------------------------
And I want to create an animation that shrinks the menu bar to show just the icons like this:
------------------------------------
o |
@ |
# | CONTENT
|
|
------------------------------------
I already make the change work by applying Visibility.GONE to the text labels and resizing the LinearLayout that contains the menu but I want to animate that "shrinking" effect. I tried applying an scale animation along x but this doesn't work. Anybody already did something similar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您在这里最好使用的是左侧导航栏。它允许您将操作项放在左侧。
https://developers.google.com/tv/android/docs/gtv_demo_samples#LeftNavBar
查看 Panoramio,了解如何将其集成到您的应用程序中的示例。这真的很简单。
完成后..对于动画效果使用:
I think what you should ideally use here is Left Navigation Bar. It allows you to put your Action items on the left.
https://developers.google.com/tv/android/docs/gtv_demo_samples#LeftNavBar
Check out Panoramio for an example of how to integrate it in your app. Its really simple.
Once thats done..for the animation effect use: