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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:30:28+00:00 2026-06-13T10:30:28+00:00

I have an issue with my android app when i use android:configChanges=orientation . I

  • 0

I have an issue with my android app when i use android:configChanges="orientation". I want to prevent reloading activity after changing acreen orientation (above xml param works in other app) but this time it fails.

The thing is, that i want my activity (SherlockActivity) to keep portrait on start, but after OnClickListener event i need to enable it with:

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);

Is there any other method that should be run to prevent that reload?

  • 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-13T10:30:29+00:00Added an answer on June 13, 2026 at 10:30 am

    The android:configChanges parameter should work (it worked for me flawlessly). Just a blind guess – if you’re targeting API level 13 or higher, you also have to include screenSize:

    Caution: Beginning with Android 3.2 (API level 13), the “screen size”
    also changes when the device switches between portrait and landscape
    orientation. Thus, if you want to prevent runtime restarts due to
    orientation change when developing for API level 13 or higher (as
    declared by the minSdkVersion and targetSdkVersion attributes), you
    must include the “screenSize” value in addition to the “orientation”
    value. That is, you must decalare
    android:configChanges=”orientation|screenSize”. However, if your
    application targets API level 12 or lower, then your activity always
    handles this configuration change itself (this configuration change
    does not restart your activity, even when running on an Android 3.2 or
    higher device).

    (excerpt from here)

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

Sidebar

Related Questions

I know you can use this: android:configChanges=orientation to eliminate redraws on orientation changes. Although
I am trying use the onClick() function in an activity for an android app.
I have an issue with directory creation in Android. I use this code to
I am having a serious issue with my app. I use the permission android.permission.ACCESS_COARSE_LOCATION
i have a issue with programming for android. i have a string like this:
I have an issue that when I leave the android device idle for a
I have an issue with importing a picture from the Album in Android, because
I have a very specific SSL issue on my Android. If I try to
Hi I am new to android and I am having an issue I have
I have successfully implemented this from android to a java httpservlet on google app

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.