I want to translate this imageview from relative_bottom to relative_top layout through animation. I want to put that image in center of relative_top layout. this is my splashscreen so i want this to transit automatically.
here is hiiii as imageview.I want to animate this automatically:
I dont know how to set exact position.
- What should I add to get such output? I have tried many ways but couldn't get a solution.
Sample xml file:
<LinearLayout android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg"
android:layout_weight="2"
android:layout_gravity="center"
android:id="@+id/relative_top"
android:orientation="vertical">
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:paddingLeft="50dp"
android:paddingRight="50dp"
android:id="@+id/bottom"
android:layout_gravity="center_horizontal"
android:gravity="top">
<ProgressBar>
....
</Progressbar>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/relative_bottom"
android:layout_alignTop="@id/progressBar"
android:layout_centerInParent="true"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageview"
android:src="@drawable/logo"
android:scaleType="fitCenter"
/>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>