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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:53:52+00:00 2026-06-08T02:53:52+00:00

When I turn my Android phone upside down, my Activity does not rotate to

  • 0

When I turn my Android phone upside down, my Activity does not rotate to show the layout upside down but stays in landscape mode instead. I tried this with a very simple HelloWorld app. I added android:configChanges="orientation" to the manifest and overrode onConfigurationChange() in the Activity to set breakpoints there. Rotating the device upside down produces one config change to go from portrait (upside up) to landscape but no second change from landscape to portrait (upside down). Is this an Android issue or is there something I need to do?

Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="hello.world"
    android:versionCode="1"
    android:versionName="1.0" >
   <uses-sdk android:minSdkVersion="10" />
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:configChanges="orientation"
            android:name=".HelloWorldActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

Activity:

public class HelloWorldActivity
  extends Activity
{
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState)
  {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
  }

  public void onConfigurationChanged(Configuration newConfig)
  {
    super.onConfigurationChanged(newConfig);
    if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE)
    {
      Log.e("MDO", "orientation change: landscape");
    }
    else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT)
    {
      Log.e("MDO", "orientation change: portrait");
    }
  }
}
  • 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-08T02:53:54+00:00Added an answer on June 8, 2026 at 2:53 am

    It’s not an issue, it’s how Android works. It views upside-down only in landscape mode and not in portrait (and in landscape from version 2.2 if I remember correctly). Configuration change occurs when it goes from portrait to landscape and vice versa. If you want to check if the phone was flipped upside down or in whatever direction you’ll have to access accelerometer sensor. Here’s a tutorial on how to use it and here you have SensorManager docs.

    EDIT: as the author of the question found out himself, adding android:screenOrientation="fullSensor" to your manifest is enough, provided that you don’t want to support anything older than Android 2.3 (API level 9).

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

Sidebar

Related Questions

I am writing a phone dialer app for android. I created a layout for
I have an Android activity which in turn starts a thread. In the thread
I'm having some trouble getting debug mode to work on my android phone. I
I'm developing an application that can turn off the sound of Android Phone automatically.
Is it possible to turn on the phone radios (3G/Data connection) from an android
Is it possible to turn off the silent mode programmatically in Android?
Is it possible to turn off the screen partially in android phones (while keeping
Possible Duplicate: How Turn on only Camera flash light programmatically in android? I am
I am trying to turn a couple buttons into a reusable component in Android.
I'm pretty exasperated. I'm attempting to build a turn-based multiplayer online game for Android

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.