Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7822187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:51:20+00:00 2026-06-02T07:51:20+00:00

i have 2 activities, and i want to create an animated transition between the

  • 0

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 confusion, and thanks for reading this.

P.S. i’m using textviews… i guess that renders too quickly? I’m also using Motorola Razr, not that it should matter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:51:21+00:00Added an answer on June 2, 2026 at 7:51 am

    Nevermind, that was a dumb error – i didn’t understand what the documentation meant by “entering animation” vs “exiting animation”. i need to swap the xmls by changing:

    FirstActivity.this.overridePendingTransition(R.anim.slide, R.anim.slide2);
    

    into

    FirstActivity.this.overridePendingTransition(R.anim.slide2, R.anim.slide);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an android application and while switching between two activities I want to
I have two activities. In first I come to the second activity from first
I have 40 activities that do not depend on each other. I want to
I have four activities namely, Demo_tabActivity.java [main activity] Tabhost.java The below two activities are
I have four activities namely, Demo_tabActivity.java [main activity] Tabhost.java The below two activities are
I have five activities/screens that I would like to be able to swipe between,
I want to have an options menu that is available to all Activities in
I have a situation where I want to connect two tables that do not
I have an activity which shows an image (ViewCollection.java). I want to only create
I have two activities which I want to combine with a FragmentPagerAdapter. I followed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.