Lean back 모드는 전체화면 모드 중 하나로 사용자가 비디오 시청을 하는 등의 화면과의 많은 상호 작용이 없는 시나리오를 지원하는 모드다.
같은 전체 화면 모드인 Immersive, Sticky immersive 모드와의 차이점은 상태표시줄이나 내비게이션 바 같은 시스템 바의 사용을 원하면 화면 아무 곳이나 터치하면 된다.
Lean back 모드를 활성화하기 위해선, setSystemUiVisibility() 메소드를 호출해 SYSTEM_UI_FLAG_FULLSCREEN flag와 SYSTEM_UI_FLAG_HIDE_NAVIGATION flag를 전달하면 된다.
시스템 바가 다시 나타날 때, 당신은 다른 적절한 UI를 업데이트하는 콜백을 받을 수 있다. 이는 Responding to UI VIsibility Changes를 참고해라.
안드로이드에서 지원하는 전체 화면 모드에서 가장 기본이 되는 모드인 것 같다. 이는 Lean back 모드는 활성화를 위해 setSystemUiVisibility() 메소드를 호출해 SYSTEM_UI_FLAG_FULLSCREEN flag와 SYSTEM_UI_FLAG_HIDE_NAVIGATION flag만 전해주면 되는데 비해, Immersive 모드나 Sticky immersive 모드는 활성화를 위해 각각 SYSTEM_UI_FLAG_IMMVERSIVE와 SYSTEM_UI_FLAG_IMMERSIVE_STICKY를 추가로 전달해줘야 하는걸 통해 유추할 수 있다.
Lean back 모드라는 이름은 동영상을 시청할 때 떠오르는 가장 일반적인 모습을 따 명명한 게 아닌가싶다.
* Lean back
: 상체를 뒤로 젖히다.
The lean back mode is for fullscreen experiences in which users won't be interacting heavily with the screen, such as while watching a video.
When users want to bring back the system bars, they simply tap the screen anywhere.
To enable lean back mode, call setSystemUiVisibility() and pass SYSTEM_UI_FLAG_FULLSCREEN and SYSTEM_UI_FLAG_HIDE_NAVIGATION.
When the system bars re-appear, you can receive a callback to make other appropriate updates to your UI. See Responding to UI Visibility Changes.
출처
- https://developer.android.com/training/system-ui/immersive
- https://developer.android.com/training/system-ui/visibility
'기술(Tech, IT) > 안드로이드(Android)' 카테고리의 다른 글
[Android] Android SDK(Software Development Kit) (0) | 2023.02.20 |
---|---|
[Android] Soong Build System (0) | 2022.01.11 |
[Android] Immersive mode(이머시브 모드) - 전체 화면 모드 (1) (0) | 2021.09.16 |
[Android] isInMultiWindowMode() 멀티 윈도우 모드 확인 메소드 (0) | 2021.09.15 |
[Android] translatable(strings.xml, arrays.xml ..) (0) | 2021.09.14 |