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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:29:34+00:00 2026-06-06T20:29:34+00:00

When the user changes the language locale, I would like to reload the activity

  • 0

When the user changes the language locale, I would like to reload the activity with the new locale. I want to create an animated transition when finishing the Activity and starting it again.

The transition animation is as follows:

The exit animation is to scale the activity to the center of the screen.
The enter animation is to scale the activity from the center of the screen.

finish();
overridePendingTransition(0, R.anim.scale_to_center);
Intent intent =new Intent(SettingsActivity.this, SettingsActivity.class);
startActivity(intent);
overridePendingTransition(R.anim.scale_from_center, 0);

and my scale_to_center.xml is:

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <scale android:fromYScale="1.0" android:toYScale="0"
        android:fromXScale="1.0" android:toXScale="0" 
        android:pivotX="50%" android:pivotY="50%"
        android:duration="500"/>
</set>

and my scale_from_center.xml is:

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <scale android:fromYScale="0" android:toYScale="1.0"
        android:fromXScale="0" android:toXScale="1.0" 
        android:pivotX="50%" android:pivotY="50%"
        android:startOffset="500"
        android:duration="2000"/>
</set>

The problem is that ONLY the enter transition appears and the exit transition do not appear. I tried to add a delay to the exit transition but it didn’t work either.

However when I changed the code to only animate the exit of application. It worked.

finish();
overridePendingTransition(0, R.anim.scale_to_center);

Thanks.

  • 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-06T20:29:36+00:00Added an answer on June 6, 2026 at 8:29 pm

    Set the two animations on the method overridePendingTransition and call finish after you’ve called startActivity:

    Intent intent = new Intent(SettingsActivity.this, SettingsActivity.class);
    startActivity(intent);
    overridePendingTransition(R.anim.scale_from_center, R.anim.scale_to_center);
    finish();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to immediately propagate user changes (change of user roles) in my
In my application I would like create a settings where user can be able
I'm using a location.reload() with JQUERY to refresh when a user changes language. I
I want to change my user interface language at run time. what is the
I want to edit links when the user changes the value of a <input
I would like to know if this is possible in java that i want
In my application, users can choose a language, so I would like my app
I want to change the language when the user introduce in the url the
I have an User model who has_one :preference , but I would like to
I have a multi language app. I want to give the user the ability

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.