如何使这种动画的android? [英] How to make such animation in android?

查看:126
本文介绍了如何使这种动画的android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Andr​​oid应用程序的看法是这样的形象:

In My Android Application the view is like this image:

现在,这里D是小部分这是任何看法或可能已经按钮。 我要的是,如果用户点击该D的一部分,该视图显示在不同的颜色应转变到从左至右的方式,只有D的一部分出现在屏幕的最右边。如果用户再次点击该D的一部分,该视图是从右到左平移和见过像上面的图片。

Now, Here D is small part which is any view or may ve button. I want is, If the User click on that "D" part, the view appear in the different color should be translate in to the Left to right way and Only the "D" part appear at the most right edge of the screen. And if user again click on that "D" part, the View is translate from Right to Left and seen like above image.

因此​​,如何有可能使。 您的帮助将是真的AP preciated。 谢谢你。

So How it is possible to make. Your help will be realy appreciated. Thanks.

推荐答案

此观点被称为滑动抽屉。

This view is called Sliding drawer.

您可以参考链接,滑动抽屉控制。

You can refer this link for sliding drawer control.

有一些链接

链接1

<一个href="http://stackoverflow.com/questions/1137350/how-to-make-an-android-slidingdrawer-slide-out-from-the-left">Link2

修改

是滑动抽屉的演示例子

And this is the link of demo example of Sliding-drawer

在本演示的例子有一个布局名称main.xml中在那里有一个变量我:方向=topToBottom这说明,从要打开推拉抽屉

In this demo example there is a layout name "main.xml" in there there is a variable my:direction="topToBottom" this describe that from where you want to open sliding-drawer

在你的情况,你想从左至右滑动,因此,您的变量将是我:方向=leftToRight

In your case you want to slide from left to right so your variable will be my:direction="leftToRight"

这篇关于如何使这种动画的android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆