我正在尝试开发一个闪屏与大的图像滚动(动画)从上到下。我不认为使用ScrollView会很好,因为我不想让用户滚动图像。
这就是我想要实现的:

发布于 2014-08-21 00:55:38
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="200"
android:fromYDelta="-100%p"
android:toYDelta="100%p"
>
</translate>
</set>在项目的动画文件夹中创建此动画作为slidedown.xml,并在具有view.You的java文件中使用以下代码,可以根据需要更改"android:fromYdelta“的值。
myImageView.startAnimation(slidedown);发布于 2014-08-21 00:56:54
例如,如果您的图像视图是250像素,请使用:
ObjectAnimator.ofFloat(myImageView, "translationY", 250);在您的图像视图上设置的xml中:
android:translationY="-250"https://stackoverflow.com/questions/25410141
复制相似问题