【发布时间】:2012-11-23 14:47:16
【问题描述】:
这是我的 xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<SurfaceView
android:layout_width="match_parent"
android:layout_height="10dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="0dp" />
</RelativeLayout>
我想让这个观点随着时间的推移而增长。
这是动画的代码
SurfaceView surfaceViewTimer = (SurfaceView) findViewById(R.id.surface_view_timer);
Animation surfaceGrowingAnimation = new TranslateAnimation
(0, 0, Animation.ZORDER_TOP, 300);
surfaceGrowingAnimation.setDuration(5000);
surfaceViewTimer.startAnimation(surfaceGrowingAnimation);
我想让这个动画从屏幕底部到顶部。目前它是从上到下。
【问题讨论】:
标签: android animation imageview surfaceview