java.lang.IllegalStateException: 只有全屏不透明活动可以请求方向

java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation

我在 Android 8.0 Oreo java.lang.IllegalStateException 中从通讯录中检索联系人时遇到问题:只有全屏不透明活动可以请求方向

我正在尝试从 phone 通讯录中获取我的 activity 中的联系人,它非常适合 Lollipop、Marshmallow、Nougat 等,但它会给我错误信息,例如 Oreo这请帮助我。我的代码在下面。

演示代码:-

private void loadContacts() {
            contactAsync = new ContactLoaderAsync();
            contactAsync.execute();
        }

        private class ContactLoaderAsync extends AsyncTask<Void, Void, Void> {
            private Cursor numCursor;

            @Override
            protected void onPreExecute() {
                super.onPreExecute();
                Uri numContacts = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;
                String[] numProjection = new String[]{ContactsContract.CommonDataKinds.Phone.CONTACT_ID, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.CommonDataKinds.Phone.TYPE};
                if (android.os.Build.VERSION.SDK_INT < 11) {
                    numCursor = InviteByContactActivity.this.managedQuery(numContacts, numProjection, null, null, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " COLLATE NOCASE ASC");
                } else {
                    CursorLoader cursorLoader = new CursorLoader(InviteByContactActivity.this, numContacts, numProjection, null, null, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME + " COLLATE NOCASE ASC");
                    numCursor = cursorLoader.loadInBackground();
                }

            }

            @Override
            protected Void doInBackground(Void... params) {
                if (numCursor.moveToFirst()) {
                    try {
                        final int contactIdIndex = numCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.CONTACT_ID);
                        final int displayNameIndex = numCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME);
                        final int numberIndex = numCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);
                        final int typeIndex = numCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE);
                        String displayName, number, type;
                        do {
                            displayName = numCursor.getString(displayNameIndex);
                            number = numCursor.getString(numberIndex);
                            type = getContactTypeString(numCursor.getString(typeIndex), true);
                            final ContactModel contact = new ContactModel(displayName, type, number);
                            phoneNumber = number.replaceAll(" ", "").replaceAll("\(", "").replaceAll("\)", "").replaceAll("-", "");

                            if (phoneNumber != null || displayName != null) {
                                contacts.add(phoneNumber);
                                contactsName.add(displayName);
                                contactsChecked.add(false);

                                filterdNames.add(phoneNumber);
                                filterdContactNames.add(displayName);
                                filterdCheckedNames.add(false);
                            }
                        } while (numCursor.moveToNext());
                    } finally {
                        numCursor.close();
                    }
                }


                Collections.sort(contacts, new Comparator<String>() {
                    @Override
                    public int compare(String lhs, String rhs) {
                        return lhs.compareToIgnoreCase(rhs);
                    }
                });

                InviteByContactActivity.this.runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        mContactAdapter.notifyDataSetChanged();
                    }
                });

                return null;
            }
        }

        private String getContactTypeString(String typeNum, boolean isPhone) {
            String type = PHONE_TYPES.get(typeNum);
            if (type == null)
                return "other";
            return type;
        }

        static HashMap<String, String> PHONE_TYPES = new HashMap<String, String>();

        static {
            PHONE_TYPES.put(ContactsContract.CommonDataKinds.Phone.TYPE_HOME + "", "home");
            PHONE_TYPES.put(ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE + "", "mobile");
            PHONE_TYPES.put(ContactsContract.CommonDataKinds.Phone.TYPE_WORK + "", "work");
        }
}

错误日志:-

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example, PID: 6573
                                                             java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/com.example.Activity.InviteByContactActivity}: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation
                                                              Caused by: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation

在 Android O 及以后设置

时会发生此错误
 android:screenOrientation="portrait"

在清单中。

删除该行并使用

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

在你的 activity 中。

这将解决您的问题。

Google 在 v27 之后在 Activity 的 onCreate 方法上抛出这个异常,它们的意思是:如果一个 Activity 是半透明的或浮动的,它的方向应该是靠着parent(背景)Activity,不能自己做决定。

即使您从浮动或半透明 Activity 中移除 android:screenOrientation="portrait" 但固定其 parent(背景)方向 Activity,它仍然由 parent, 我已经测试过了

一种特殊情况:如果您在启动器上设置半透明 Activity,它没有 parent(背景),因此请始终随设备旋转。想要修复它,你必须采取另一种方式来替换<item name="android:windowIsTranslucent">true</item>样式。

我不知道这是 Google 的错误还是预期的行为,但我(至少暂时)通过在 Gradle 中将 compileSdkVersion 和 targetSdkVersion 改回 26 解决了这个问题...

如果您还没有解决问题,只需像这样在清单中注册广告 activity:

<activity
android:name="com.google.android.gms.ads.AdActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
tools:replace="android:theme"
 />

您还需要更新到最新版本的sdk。

可能你显示的 Activity 看起来像对话框(非全屏),所以从 Manifest 或代码中删除 screenOrientation .这将解决问题。

我不能同意评分最高的答案,因为

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

导致错误

java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation

但这对我有用

<style name="TranslucentTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowContentOverlay">@null</item>
</style>

并将其用于您的 Activity,当您从

扩展时
InterstitialActivity extends AppCompatActivity

在AndroidManifest.xml

    <activity
        android:name=".InterstitialActivity"
        ...
        android:screenOrientation="portrait"
        android:theme="@style/TranslucentTheme" />

唯一真正有效的解决方案:

变化:

<item name="android:windowIsTranslucent">true</item>

至:

<item name="android:windowIsTranslucent">false</item>

在styles.xml

但这可能会导致启动画面出现问题(启动时出现白屏)...在这种情况下,将以下行添加到 styles.xml:

 <item name="android:windowDisablePreview">true</item> 

就在 windowIsTranslucent 线下方。

如果前面的提示不起作用,最后的机会:目标 SDK 26 而不是 27。

如果使用全屏透明activity,则无需在activity上指定方向锁定。它将采用父 activity 的配置设置。因此,如果父 activity 在清单中有:

android:screenOrientation="portrait"

您的半透明 activity 将具有相同的方向锁定:纵向。

很多人都给出了修复,那我就说说问题的根源吧

根据异常日志:

Caused by: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation
    at android.app.Activity.onCreate(Activity.java:1081)
    at android.support.v4.app.SupportActivity.onCreate(SupportActivity.java:66)
    at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:297)
    at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:84)
    at com.nut.blehunter.ui.DialogContainerActivity.onCreate(DialogContainerActivity.java:43)
    at android.app.Activity.performCreate(Activity.java:7372)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1218)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3147)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3302) 
    at android.app.ActivityThread.-wrap12(Unknown Source:0) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891) 
    at android.os.Handler.dispatchMessage(Handler.java:108) 
    at android.os.Looper.loop(Looper.java:166)

Activity.java

中触发异常的代码
    //Need to pay attention mActivityInfo.isFixedOrientation() and ActivityInfo.isTranslucentOrFloating(ta)
    if (getApplicationInfo().targetSdkVersion >= O_MR1 && mActivityInfo.isFixedOrientation()) {
        final TypedArray ta = obtainStyledAttributes(com.android.internal.R.styleable.Window);
        final boolean isTranslucentOrFloating = ActivityInfo.isTranslucentOrFloating(ta);
        ta.recycle();

        //Exception occurred
        if (isTranslucentOrFloating) {
            throw new IllegalStateException(
                    "Only fullscreen opaque activities can request orientation");
        }
    }

mActivityInfo.isFixedOrientation():

        /**
        * Returns true if the activity's orientation is fixed.
        * @hide
        */
        public boolean isFixedOrientation() {
            return isFixedOrientationLandscape() || isFixedOrientationPortrait()
                    || screenOrientation == SCREEN_ORIENTATION_LOCKED;
        }
        /**
        * Returns true if the activity's orientation is fixed to portrait.
        * @hide
        */
        boolean isFixedOrientationPortrait() {
            return isFixedOrientationPortrait(screenOrientation);
        }

        /**
        * Returns true if the activity's orientation is fixed to portrait.
        * @hide
        */
        public static boolean isFixedOrientationPortrait(@ScreenOrientation int orientation) {
            return orientation == SCREEN_ORIENTATION_PORTRAIT
                    || orientation == SCREEN_ORIENTATION_SENSOR_PORTRAIT
                    || orientation == SCREEN_ORIENTATION_REVERSE_PORTRAIT
                    || orientation == SCREEN_ORIENTATION_USER_PORTRAIT;
        }

        /**
        * Determines whether the {@link Activity} is considered translucent or floating.
        * @hide
        */
        public static boolean isTranslucentOrFloating(TypedArray attributes) {
            final boolean isTranslucent = attributes.getBoolean(com.android.internal.R.styleable.Window_windowIsTranslucent, false);
            final boolean isSwipeToDismiss = !attributes.hasValue(com.android.internal.R.styleable.Window_windowIsTranslucent)
                                            && attributes.getBoolean(com.android.internal.R.styleable.Window_windowSwipeToDismiss, false);
            final boolean isFloating = attributes.getBoolean(com.android.internal.R.styleable.Window_windowIsFloating, false);
            return isFloating || isTranslucent || isSwipeToDismiss;
        }

根据以上代码分析,当TargetSdkVersion>=27时,使用SCREEN_ORIENTATION_LANDSCAPE、SCREEN_ORIENTATION_PORTRAIT等相关属性时,会触发windowIsTranslucent、windowIsFloating、windowSwipeToDismiss主题属性的使用一个例外。

找到问题后,您可以根据需要更改TargetSdkVersion或者去掉主题的相关属性。

在 android Oreo (API 26) 中,您无法更改 Activity 的方向 Activity 样式

 <item name="android:windowIsTranslucent">true</item>

 <item name="android:windowIsFloating">true</item>

你有几种方法可以解决这个问题:

1) 您可以简单地删除上面的行(或将其变为 false)并且您的应用可以正常工作。

2) 你可以先从清单中删除下面那行activity

android:screenOrientation="portrait"

然后你必须添加这一行到你的activity(在onCreate()中)

'>=' change to '!=' thanks to Entreco comment

    //android O fix bug orientation
    if (android.os.Build.VERSION.SDK_INT != Build.VERSION_CODES.O) {
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }

3) 您可以在 values-v26 文件夹中创建新的 styles.xml 并将其添加到您的 style.xml。 (感谢 AbdelHady 评论)

 <item name="android:windowIsTranslucent">false</item>
 <item name="android:windowIsFloating">false</item>

27之后发生的,用targetSdkVersion 26替换,等待google修复

在清单文件中将第二个 activity parentActivityName 设置为第一个 activity 并删除第二个 activity 的 screenOrientation 参数。这意味着您的第一个 activity 是父级并决定第二个 activity 的方向。

<activity
        android:name=".view.FirstActiviy"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme" />

<activity
        android:name=".view.SecondActivity"
        android:parentActivityName=".view.FirstActiviy"
        android:theme="@style/AppTheme.Transparent" />

我遇到了同样的问题,我的解决办法是去掉那行

android:screenOrientation="portrait"

然后在 activity 中添加:

if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}

只需在 Manifiest.xml

中设置 activity 的方向
android:screenOrientation="unspecified"

或仅限纵向

你也可以在Activity, In onCreate方法调用之前使用super.onCreate(...)例如

@Override
    protected void onCreate(Bundle savedInstanceState) {
        setOrientation(this);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.your_xml_layout);
        //...
        //...
}

// Method 
public static void setOrientation(Activity context) {
   if (android.os.Build.VERSION.SDK_INT == Build.VERSION_CODES.O)
        context.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
      else
        context.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}

我用 android:screenOrientation="behind" 而不是 android:screenOrientation="portrait"。基本上,您创建了一个对话框(在 activity 中)并且对话框本身不能请求方向,它需要父级 activity 来执行此操作(因为父级在后台可见并且有自己的布局)。

"behind" The same orientation as the activity that's immediately beneath it in the activity stack.

经过一番研究,这个问题似乎是由 google 错误引起的。对我来说,我可以在我的 Activities onCreate 方法中保留这一行:

setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

并且我将我的 targetSdkVersion 更改为 26。在我的 onCreate 中使用该行仍然导致崩溃,而我的 targetSdkVersion 仍设置为 27。由于到目前为止没有其他人的解决方案对我有用,我发现这行得通作为暂时的临时修复。

如果使用 windowIsTranslucent 'true' 并强制设置方向,我仅在 SDK 26 (8.0.0) 中遇到此问题:

解决方法如下:

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);   

        // fixing portrait mode problem for SDK 26 if using windowIsTranslucent = true
        if (Build.VERSION.SDK_INT == 26) {
            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
        } else {
            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        }        
    }



       <style name="SplashActivty" parent="AppTheme">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowNoTitle">true</item>
    </style>



<!-- Splash screen -->
        <activity
            android:name="edu.aku.family_hifazat.activities.SplashActivity"
            android:label="@string/app_name"
            android:screenOrientation="unspecified"
            android:theme="@style/SplashActivty">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

        </activity>

用户扩展 AppCompatActivity & 它会起作用!!

当你的目标 sdk 是 28 时,问题似乎发生了。所以在尝试了很多选项之后,终于成功了。

<activity
            android:name=".activities.FilterActivity"
            android:theme="@style/Transparent"
            android:windowSoftInputMode="stateHidden|adjustResize" />

风格:-

<style name="Transparent" parent="Theme.AppCompat.Light.NoActionBar">
     <item name="android:windowIsTranslucent">true</item>
     <item name="android:windowBackground">@android:color/transparent</item>
     <item name="android:windowIsFloating">true</item>
     <item name="android:windowContentOverlay">@null</item>
     <item name="android:windowNoTitle">true</item>
     <item name="android:backgroundDimEnabled">false</item>
 </style>

注意:api 需要 parent="Theme.AppCompat.Light.NoActionBar" 28。之前在 api 有其他东西 26。工作得很好,但在 28 时开始出现问题。 希望它能帮助这里的人。 编辑:对于某些仅通过设置 <item name="android:windowIsTranslucent">false</item> and <item name="android:windowIsFloating">false</item> worked.May 取决于您实施解决方案的方式 works.In 我的情况是将它们设置为 true。

只需删除 Manifiest.xml

中 activity 的这一行 android:screenOrientation="portrait"

activity 将从它之前的 activity 获取方向,因此无需应用具有 <item name="android:windowIsTranslucent">true</item> 的方向。

如果非要用setRequestedOrientation(),没办法只能牺牲Android8.0

上的windowIsTranslucent属性

values\styles.xml api 级别 25- (<8.0)

<style name="Base.Theme.DesignDemo" parent="Base.Theme.AppCompat.Light">
        ...
        <item name="android:windowIsTranslucent">true</item>
        ...
    </style>

values-v26\styles.xml api 级别 26 (=8.0)

<style name="Base.Theme.DesignDemo" parent="Base.Theme.AppCompat.Light">
    ...
    <!-- android 8.0(api26),Only fullscreen opaque activities can request orientation -->
    <item name="android:windowIsTranslucent">false</item>
    ...
</style>

values-v27\styles.xml api 级别 27+ (>8.0)

<style name="Base.Theme.DesignDemo" parent="Base.Theme.AppCompat.Light">
    ...
    <item name="android:windowIsTranslucent">true</item>
    ...
</style>

当我尝试捕获图像或从图库中获取图像时出现此错误对我有用的是将两者都删除

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

android:screenOrientation="portrait"

现在我的activity正在使用这个主题:

  <style name="Transparent" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:windowAnimationStyle">@android:style/Animation</item>
        <item name="android:windowIsTranslucent">false</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:backgroundDimEnabled">false</item>
    </style>

只有8.0.0抛出异常,8.0以上已经去除异常

这是 style.xml 文件中 android 版本 7(Api 级别 24,25)和 8(api 级别 26)中的主题之间的冲突(错误) ,27), 当你有

android:screenOrientation="portrait" :inside specific activity (that crashes) in AndroidManifest.xml

&

<item name="android:windowIsTranslucent">true</item> 

在style.xml

里面那个activity应用的主题里

可以根据需要通过以下方式解决:

1- 删除上述引起冲突的属性

2- 根据需要将 Activity 方向更改为这些值之一:unspecifiedbehind 等等,可以在此处找到: Google reference for android:screenOrientation `

3- 在 运行 时间内以编程方式设置方向

如果activity是自己创建的,可以在Activity中试试:

@Override
public void setRequestedOrientation(int requestedOrientation) {
    try {
        super.setRequestedOrientation(requestedOrientation);
    } catch (IllegalStateException e) {
        // Only fullscreen activities can request orientation
        e.printStackTrace();
    }
}

这应该是最简单的解决方案。

尝试删除主题中的几行:

<item name="android:windowIsTranslucent">true</item>

<item name="android:windowIsFloating">true</item>

在此之后,在您的 activity 中添加 android:screenOrientation="portrait"

唯一对我有用的是改变

android:screenOrientation="portrait"

android:screenOrientation="unspecified"

在所有半透明活动的清单中。

这样它与所有 API 版本兼容,因为半透明 activity 似乎从 targetApi: 28.[=14] 继承了父 activity 的方向=]

样式可以保留,包括<item name="android:windowIsTranslucent">true</item>

我刚刚从非 full-screen 元素中删除了标签 "portrait",一切正常。

android:screenOrientation="portrait"

我遇到了同样的问题,我只是通过设置这个来修复它:<item name="android:windowIsFloating">false</item> in styles.xml

使用

android:screenOrientation="behind"

和主题

<style name="translucent" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowBackground">#beaaaaaa</item>
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowAnimationStyle">@android:style/Animation</item>
    <item name="android:typeface">normal</item>
    <item name="android:windowSoftInputMode">adjustPan</item>
    <item name="windowActionBar">false</item>
</style>

似乎目标 sdk 是饼图(api 级别 28.0)并且 windowIsTranslucent 是 true

<item name="android:windowIsTranslucent">true</item>

然后您尝试访问方向。 android oreo 8.0(api 26 级)出现问题有两种方法可以解决这个问题

  1. 删除方向
  2. 或将 windowIsTranslucent 设置为 false

如果您像这样在清单中设置方向

android:screenOrientation="portrait"

或 在 activity class 像这样

 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

从这两个地方删除。

并观察到当您将 windowIsTranslucent 设置为 true 时,它​​从父 activity 获取方向。

我最近遇到了这个问题,这里是解决方案。

无需更改您在 android 清单文件中设置的屏幕方向参数。

只需在

中添加两个文件夹
res>values
as  res>values-v26 
and res>values-v27

然后将您的 styles.xml 和 themes.xml 文件复制到那里。

并将以下参数从 TRUE 更改为 FALSE。

<item name="android:windowIsTranslucent">true</item>

<item name="android:windowIsTranslucent">false</item>

它会起作用。

Android8.0

的常见错误

请检查您的 Activity 的样式,并确保如果您没有使用任何与半透明相关的东西,请将样式更改为备用。这样我们就可以解决这个问题。

android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

我通过删除 android:screenOrientation="portrait" 并将以下代码添加到我的 onCreate

中解决了这个问题
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}

而我的主题属性是

<item name="android:windowIsTranslucent">true</item>
<item name="android:windowDisablePreview">true</item>

有些答案对我来说不是很清楚,也没有用,

所以这是导致错误的原因:

<activity
android:name=".ForgotPass_ChangePass"
android:screenOrientation="portrait" <--- // this caused the error
android:windowSoftInputMode="stateHidden|adjustPan|adjustResize"/>

android 工作室建议将 screenOrientation 设置为 fullSensor

android:screenOrientation="fullSensor"

是的,这将修复错误,但我想将我的布局保持在纵向模式,并且 fullSensor 将根据传感器采取行动

"fullSensor" The orientation is determined by the device orientation sensor for any of the 4 orientations. This is similar to "sensor" except this allows any of the 4 possible screen orientations, regardless of what the device will normally do (for example, some devices won't normally use reverse portrait or reverse landscape, but this enables those). Added in API level 9.

source: android:screenOrientation

所以对我有用的解决方案我使用了“nosensor”:

 <activity
        android:name=".ForgotPass_ChangePass"
        android:screenOrientation="nosensor"
        android:windowSoftInputMode="stateHidden|adjustPan|adjustResize"/>

"nosensor" The orientation is determined without reference to a physical orientation sensor. The sensor is ignored, so the display will not rotate based on how the user moves the device.

see android documentation here