翻译动画code [英] Translate animation code

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

问题描述

我来自一个PHP背景的这样好心一个小白原谅我,如果这是太基本的问题。

I am a noob coming from a PHP background so kindly excuse me if this is too basic a question.

基本上,这就是我想做的事:
使图像动画/从屏幕的顶部以25%的下拉5秒

Basically, this is what I want to do: make an image animate/drop from the top of the screen to 25% down in 5 seconds

所以我用Google搜索,最终于:
http://developer.android.com/reference/android/view/animation/TranslateAnimation.html

so I googled and ended up on: http://developer.android.com/reference/android/view/animation/TranslateAnimation.html

问题是我无法找到任何样本code有(像在PHP中您可以键入功能,如:php.net/explode,它显示了你爆炸()的例子,但在这里像一个noob我这是非常困难的。)是没有什么地方得到code做以上(或一个起点,我可以修改,以实现上述)?

the problem is I cannot find any sample code there (like in php you can type a function, eg: php.net/explode and it shows you an example with explode(), but here for a noob like me it's extremely difficult.) is there anywhere to get the code to do the above (or a starting point to which i can modify to achieve the above)?

推荐答案

样品code是通过SDK和AVD管理器中可用。你应该下载API演示。它表明你如何做到这一点有两种方法。通过XML通过code号1和2。该类称为LayoutAnimation2.java。您也可以在网上通过Android开发者网站查看,看<一个href=\"http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation2.html\"相对=nofollow>这里。

Sample code is available via the SDK and AVD manager. You should download API Demos. It shows you how to do this two ways. Number 1 via XML and 2 via code. The class is called LayoutAnimation2.java. You can also view it right online via the Android Developer Website, look here.

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

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