Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- 코테
- React
- Android
- 오퍼월
- TypeScript
- nuxt
- NanoHttpd
- EC2
- it
- toml
- Express
- 백준
- 코딩테스트
- 오블완
- docker
- spring boots
- 광고 id
- 티스토리챌린지
- css
- 개발
- Jenkins
- AWS
- react-native
- nginx
- python
- 파이썬
- JavaScript
- chrome
- kotlin
- Next
Archives
- Today
- Total
내맘대로 개발일지
[Kotlin] screenOrientation - 가로모드, 세로모드 본문
📱테스트 환경
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 |