如何使这种动画的android?动画、android

2023-09-05 05:04:55 作者:命里不缺狗

在我的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

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"