This is my 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>
I want to make this view grow with the time.
Here is the code for animation
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);
I want to make this animation goes from the bottom to top of the screen. Currenty it is going from the top to the bottom.
You can use a
ScaleAnimation.For instance, modify the layout so that the surface takes whole screen:
And then scale it on Y-axis from 0 to 1: