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 8068113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:33:10+00:00 2026-06-05T12:33:10+00:00

In an activity, I’m trying to make a custom transition between two Activities .

  • 0

In an activity, I’m trying to make a custom transition between two Activities. I want the current Activity to shrink towards its to about half its size, then have the x-values perform a scale transformation so it looks as if the Activity is rotating in 3-D. Then, after that animation is over, I want the same animation in the exact opposite order to happen on the new Activity.

My question is, how can I have a pause in the animation, so that the animation for the entering Activity does not start until after the exiting animation has ended? I have to use the overridePendingTransition method, so all animations passed must be int values from R.anim. Otherwise, it would be easy using AnimationListener. But I cannot think of a way to do it.

Any ideas?

EDIT: I’ve since figured it out, so you can check out the answers!

  • 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-05T12:33:14+00:00Added an answer on June 5, 2026 at 12:33 pm

    For anyone who is trying to accomplish the same thing, I figured it out. The secret is to use android:startOffset in the XML. The code is as follows:

    The exit animation:

    <set xmlns:android="http://schemas.android.com/apk/res/android">
      <scale
          android:fromXScale="1.0" android:toXScale="0.8"
          android:fromYScale="1.0" android:toYScale="0.8"
          android:pivotX="50%p" android:pivotY="50%p"
          android:interpolator="@android:anim/accelerate_interpolator"
          android:duration="100" />
      <scale
          android:fromXScale="1.0" android:toXScale="0.0"
          android:fromYScale="1.0" android:toYScale="1.0"
          android:pivotX="50%p" android:pivotY="50%p"
          android:interpolator="@android:anim/accelerate_interpolator"
          android:duration="150"
          android:startOffset="100" />
    </set>
    

    The entrance animation:

    <set xmlns:android="http://schemas.android.com/apk/res/android">
      <scale
          android:fromXScale="0.0" android:toXScale="1.0"
          android:fromYScale="1.0" android:toYScale="1.0"
          android:pivotX="50%p" android:pivotY="50%p"
          android:interpolator="@android:anim/accelerate_interpolator"
          android:duration="150"
          android:startOffset="250" />
    
      <scale
          android:fromXScale="0.8" android:toXScale="1.0"
          android:fromYScale="0.8" android:toYScale="1.0"
          android:pivotX="50%p" android:pivotY="50%p"
          android:interpolator="@android:anim/accelerate_interpolator"
          android:duration="100"
          android:startOffset="400" />
    </set>
    

    Then the Java code:

    startActivity(new Intent(this, YourNextActivity.class));
    overridePendingTransition(R.anim.enter_anim, R.anim.exit_anim);
    

    This creates a smooth, well-timed animation that makes it seem as if the next Activity being created is on the “back” of the current Activity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application has one activity which starts two services but does not bind them.
My situation: an activity with a button, a checkbox checkAll and a custom ListView
Activity solution[a][b]; // ... Activity **mother = solution; I want to convert 2D array
In Activity I have two ListViews but now I must to detect on what
I have an activity which shows an image (ViewCollection.java). I want to only create
I am writing custom activity for sharepoint workflow and I don't know how I
I want my activity indicator to be displayed until the full web page is
I have two models: Activity and Place. The Activity model has a ReferenceProperty to
Ths activity it's call from TabActivity. And I want: if I receive new notification
My Activity locks its orientation by using setRequestedOrientation(). However, once this is set to

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.