📱테스트 환경
Samsung Galaxy Tab Advanced2
개발하는 도중 화면이 어떻게 보여야하는지 정할때가 있는데 그때 사용하는 것이 screenOrientation 이다.
<activity
android:name=".activity.MainActivity"
android:autoVerify = "true"
android:theme="@style/AppTheme.NoActionBar"
android:screenOrientation="landscape"
android:exported="true">
</activity>
이런식으로 landscape 를 적용해주면 가로모드로 고정된다.
이외에도 여러 옵션들이 있는데
- unspecified : 기본값
- portrait : 세로모드
- reverseLandscape : 가로모드 반대방향
- reversePortrait : 세로모드 반대방향
이외에도 여러 옵션이 있긴 하지만 이정도만 알고있어도 괜찮을것 같다는 생각이 있지만
필요한 옵션이 다르다면 더 찾아보면 많이 지원하니까 찾아보면 된다.
'Android > Kotlin' 카테고리의 다른 글
[Kotlin] WebView Input 파일 선택 (0) | 2024.04.03 |
---|---|
[Kotlin] onBackPressed deprecated ... -> OnBackPressedCallback (1) | 2024.03.22 |
[Kotlin] Android <-> Javascript 데이터 전송하기 (0) | 2024.03.19 |
[Kotlin] 안드로이드 UUID 확인하는 방법 (0) | 2024.03.16 |
[Kotlin] Model 버전 조회 하는 방법 (0) | 2024.03.16 |