Google Plus tile animation

主宰稳场 提交于 2019-12-02 16:25:40

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 :)

I would check out the carousel example code provide by google http://code.google.com/p/renderscript-examples/wiki/Carousel

Essentially what this does is creates a series of tiles that can be textured by any image you please. The code is set up out of the box to do a cylindrical carousel from the outside but you can move the view point and even make it flat as in the g+ example if you so chose.

A note of caution, as of Jellybean (4.1) Google has deprecated the graphics components of renderscript. We have begun the process of moving everything over from renderscript to openGL at our company, so be sure to evaluate if making new code with a deprecated API makes sense for you particular usage.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!