앱이 회전이 안되고 가로 or 세로 모드로 고정 하는 설정 방법
AndroidManifest.xml의 Activity의 android:screenOrientation의 속성을 설정 하면 됩니다.
1. 세로모드
android:screenOrientation = portrait
2. 가로 모드
android:screenOrientation = landscape
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ggulcompany.testproject">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MaterialComponents.Light.NoActionBar.Bridge">
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
반응형
'안드로이드 Development' 카테고리의 다른 글
[안드로이드] String.xml에 정의된 값을 코드에서 불러오기 (0) | 2022.05.22 |
---|---|
[안드로이드] String to Color, Color to String (0) | 2022.05.08 |
[안드로이드] The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED Error 해결 방법 (0) | 2022.04.17 |
댓글