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

  • Home
  • SEARCH
  • 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 6337439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:15:09+00:00 2026-05-24T19:15:09+00:00

how do you keep the activity from restarting when the screen rotates or when

  • 0

how do you keep the activity from restarting when the screen rotates or when then user slides the keyboard on the phone? Is this possible? Is there a work around or something? All relevant answers are appreciated.

  • 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-05-24T19:15:10+00:00Added an answer on May 24, 2026 at 7:15 pm

    You can do this by declaring a specific attribute in your activity element in your manifest.xml. The element in question is called android:configChanges, and you need to register the string value of orientation.

    <activity android:name=".MyActivity"
          android:configChanges="orientation"
          android:label="@string/app_name">
    

    From the documentation:

    Now when one of these configurations change, MyActivity is not
    restarted. Instead, the Activity receives a call to
    onConfigurationChanged(). This method is passed a Configuration object
    that specifies the new device configuration. By reading fields in the
    Configuration, you can determine the new configuration and make
    appropriate changes by updating the resources used in your interface.
    At the time this method is called, your Activity’s Resources object is
    updated to return resources based on the new configuration, so you can
    easily reset elements of your UI without the system restarting your
    Activity

    So doing this will cause your Activity to not restart, and will also callback to onConfigurationChanged() so that you can handle the change yourself.

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

Sidebar

Related Questions

I keep getting the above error, going from my first activity that has a
i'm trying to start a map activity from a normal Activity. But keep getting
Keep getting this error after inserting a subdatasheet into a query and trying to
I keep getting tasks that are above my skill level. How can I address this without coming accross as grossly incompetent?
I keep running across this loading image http://georgia.ubuntuforums.com/images/misc/lightbox_progress.gif which seems to have entered into
I keep hearing from associates about grid computing which, from what I can gather,
I write WCF service and want to keep it's activity log: trace, warnings and
I will try to keep it simple: In my main activity I make a
I am trying to call a static method from another activity to find a
Going from not full screen to full screen with Android works fine. However, upon

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.