Closed dumplings closed 4 years ago
Do you mean you are not able to run the App upside-down? Or what do you mean its the same?
Do you see this behavior on iOS and Android? Maybe this problem? https://stackoverflow.com/questions/50456573/flutter-allow-iphone-upside-down
Do you mean you are not able to run the App upside-down? Or what do you mean its the same?
Do you see this behavior on iOS and Android? Maybe this problem? https://stackoverflow.com/questions/50456573/flutter-allow-iphone-upside-down
this behavior on android, and not the stackoverflow's problem.
The official document says "The orientation that is 180 degrees from portraitUp." but my what i really got is the portraitDown
's behavior is same like portraitUp
, not 180 degrees from portraitUp, still same, like this:
You could give this package a try https://pub.dartlang.org/packages/auto_orientation
There is also this known bug https://github.com/flutter/flutter/issues/13238
@dumplings At a guess if you edit your android\app\src\main\AndroidManifest.xml
and modify the <activity>
tag that has android:name=".MainActivity"
attribute. Add android:screenOrientation="fullSensor"
. This should then allow it to go into reverse portrait.
@dumplings At a guess if you edit your
android\app\src\main\AndroidManifest.xml
and modify the<activity>
tag that hasandroid:name=".MainActivity"
attribute. Addandroid:screenOrientation="fullSensor"
. This should then allow it to go into reverse portrait.
I have tried your suggestion, still not work.
<application
android:name="io.flutter.app.FlutterApplication"
android:label="flutter_one"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:screenOrientation="fullSensor"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
Issue does exist on
Flutter 1.12.13+hotfix.8 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 0b8abb4724 (4 weeks ago) • 2020-02-11 11:44:36 -0800
Engine • revision e1e6ced81d
Tools • Dart 2.7.0
Hi @dumplings I cannot reproduce the issue on latest master channel.
Closing this a probably fixed. If you disagree please comment and I will reopen it. Thank you
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
code show
I used the following code to write an app. The app has 4 buttons that both trigger SystemChrome.setPreferredOrientations. The difference is in different directions. My question is: Why is the result of portraitDown and portraitUp the same, is it the way I use it? wrong?
Logs