KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
i have 2 activities, and i want to create an animated transition between the two activities such that both activities's views slides up as if the second activity is pushing the first activity upwards. in my first activity i use: Intent iSecondActivity = new Intent(FirstActivity.this,SecondActivity.class); FirstActivity.this.startActivity(iSecondActivity); FirstActivity.this.overridePendingTransition(R.anim.slide, R.anim.slide2); and my slide.xml looks like: <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator"> <translate android:interpolator="@android:anim/decelerate_interpolator" android:fromYDelta="0" android:toYDelta="-100%p" android:duration="2000" /> </set> and my slide2.xml looks like: <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator"> <translate android:interpolator="@android:anim/decelerate_interpolator" android:fromYDelta="100%p" android:toYDelta="0" android:duration="2000" /> </set> HOWEVER, the problem is that when the "startActivity" is called, the second activity's view is already rendered while the transition just starts sliding. I would like to see the first activity's view slide up... but instead i'm seeing the second activity's view (rendered over the first activity's view) slide up. the second problem is that i'm seeing the replacement view being the first activity's view. i would like the replacement view to be the second activity's view that is pushing upwards. It's hard to explain, so please let me know if i can explain anything in more detail. apologies for any confus
Tags (comma-separated)
Save Edits
Cancel