1
オリエンテーションをデフォルトでPortrait
に設定しようとしています。それを作るために、私が追加しました:傾いたときに方向をロックできません。可能な修正?
android:configChanges="orientation"
android:screenOrientation="portrait"
しかし、アプリの自動Landscape
モードに回転します。さらに、携帯電話Settings
でのみ向きがロックされている場合でも、傾けたときにアプリはLandscape
モードに変わります。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.browser.codedady">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<!-- Browser Main Tab -->
<activity
android:name=".Activity_Main"
android:configChanges="orientation"
android:screenOrientation="portrait"
android:label="@string/app_name"
android:launchMode="singleInstance">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="readLater" />
<action android:name="bookmarks" />
<action android:name="history" />
<action android:name="pass" />
</intent-filter>
<intent-filter
android:icon="@mipmap/ic_launcher"
android:label="@string/app_websearch">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
<!-- Other activities -->
<activity
android:name=".about.About_activity"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_intro"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_app"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_data"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_searchMain"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_close"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_start"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<activity
android:name=".helper.Activity_settings_search"
android:configChanges="orientation|screenSize"
android:launchMode="singleInstance" />
<!-- Intents -->
<activity
android:name=".helper.Activity_intent"
android:label="@string/app_name"
android:noHistory="true"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http" />
<data android:scheme="https" />
</intent-filter>
</activity>
<!-- More stuff -->
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.browser.codedady.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<activity
android:name=".Home"
android:label="@string/title_activity_home"
android:theme="@style/AppTheme" />
</application>
</manifest>
おそらくこの原因とどのようにこの問題を解決するには何ができるか:ここでは
はManifest.xml
ファイルですか?