谷歌加瓦动画 [英] Google Plus tile animation

查看:223
本文介绍了谷歌加瓦动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出如何我可以做一个类似的布局,在谷歌,加上时间线视图。 有动画,而滚动的时间表,我真的很喜欢它。 任何想法如何做到这一点?

I'm trying to figure out how I could make a similar layout as in Google plus timeline view. There's an animation while scrolling in timeline and I really like it. Any idea how to do that?

推荐答案

您需要设置一个TranslateAnimation的观点,这会做的伎俩给你。

You need to set a TranslateAnimation to the view and that would do the trick for you.

TranslateAnimation translateAnim = new TranslateAnimation(200, 0, 0, 0 );
//Use (0, 0, 200, 0 ) if you would like to animate this in a mobile device rather than a tab
listView.clearAnimation();
translateAnim.setDuration(500);   
translateAnim.setFillBefore(true);   
listView.startAnimation(translateAnim);

希望这有助于:)

Hope this helps :)

这篇关于谷歌加瓦动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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