将单个屏幕分成两部分 +动画片
根据我的项目要求,我想将屏幕分成两部分,例如:
我知道这个东西在 3.0 版中可用,但我正在开发 2.3 版,所以我必须手动执行此操作..
我想将屏幕分割为ListView的25%和内容视图的75%..以及屏幕顶部的一个按钮..
现在,每当使用时,从listView中选择一个选项,然后分割部分会自动向左滑动,整体屏幕将仅显示为内容屏幕....现在 ListView 屏幕对用户不可见..
并且每当用户单击屏幕顶部的按钮..只有这样,listview 部分才会显示给用户如上图所示..
这里我想的是我将采用两种不同的布局,在第一种布局上我将显示ListView,在另一种布局上我将列出内容视图..但是我如何在这里显示幻灯片的动画每当用户选择一个选项或单击按钮时向左和向右。
如果有人有更好的选择,请告诉我..
[编辑]:我也想在这些屏幕上显示???
谢谢..
As according to my project requirement, I want to split the screen into two parts like:
I know this thing is available in version 3.0 but I am working on 2.3 so I have to do it manually..
And I want to split the screen as 25% of ListView and 75% of content view..and a single button at the top of the screen..
Now whenever used select a option from listView then automatically the split part slide left and the whole screen will be shown as a content screen only....Now the ListView screen is not visible to the user..
And whenever the user click on the button at the top of the screen..Only then the listview part is shown to user as shown in the above image..
Here what I am thinking is I will take two different layouts and on 1 layout I will display the ListView and on another I will list the content view..But how can I show here the animation of slide left and right whenever user select an option or click the button .
If anyone has some better option,then pls let me know..
[EDIT]: Also I want to show on these screens ????
Thanks..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试在 android 中的 TranslateAnimation 类的帮助下在这 2 个基本视图上应用动画。
请参考以下链接了解更多详情:
翻译动画代码
http://开发人员。 android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/Animation3.html
http://developer.android.android.android/apis/view/LayoutAnimation2.html android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation2.html
try to apply animation on those 2 base views with the help of TranslateAnimation class in android.
please refer the following links for more details:
Translate animation code
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/Animation3.html
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation2.html