시스템 표시줄 어둡게 하기 (지원 중단됨)
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
<ph type="x-smartling-placeholder">
이 과정에서는 시스템 표시줄 (즉, 상태 표시줄 및 탐색 메뉴)을 흐리게 만드는 방법을 설명합니다.
막대)를 사용할 수 있습니다. Android는 기본 색상이나 배경화면 크기를 어둡게 하는 방법을
시스템 표시줄이 있습니다.
이 방법을 사용하면 콘텐츠 크기가 조절되지 않지만 시스템 표시줄의 아이콘
떨어집니다. 사용자가 상태 표시줄이나 탐색 메뉴 영역을 터치하면 즉시
두 막대 모두 완전히 표시됩니다. 이 기능의 장점은
막대는 여전히 존재하지만 세부 정보가 가려져서
바에 쉽게 접근할 수 있도록 몰입도 높은 경험을 제공합니다.
상태 표시줄과 탐색 메뉴 흐리게 만들기
상태 표시줄과 탐색 메뉴를 어둡게 하려면
SYSTEM_UI_FLAG_LOW_PROFILE
플래그를 사용하면 됩니다.
Kotlin
// This example uses decor view, but you can use any visible view.
activity?.window?.decorView?.apply {
systemUiVisibility = View.SYSTEM_UI_FLAG_LOW_PROFILE
}
자바
// This example uses decor view, but you can use any visible view.
View decorView = getActivity().getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_LOW_PROFILE;
decorView.setSystemUiVisibility(uiOptions);
사용자가 상태나 탐색 메뉴를 터치하면 플래그가 지워집니다.
막대가 흐리게 표시되지 않도록 하세요. 플래그가 삭제되면 앱을 재설정해야 합니다.
막대를 다시 어둡게 하려면
그림 1은 탐색 메뉴가 흐리게 표시된 갤러리 이미지를 보여줍니다 (갤러리 앱은
상태 표시줄이 완전히 숨겨집니다. 어둡게 하지 않음). 탐색 메뉴 (오른쪽
네비게이션 컨트롤을 나타내는 희미한 흰색 점이 있습니다.
그림 1. 시스템 표시줄이 희미하게 표시됨
그림 2는 동일한 갤러리 이미지를 보여주지만 시스템 표시줄이 표시되어 있습니다.
그림 2. 시스템 표시줄이 표시됨
상태 표시줄과 탐색 메뉴 표시하기
다음을 사용하여 설정된 플래그를 프로그래매틱 방식으로 지우려면
setSystemUiVisibility()
님, 가능합니다.
방법은 다음과 같습니다.
Kotlin
activity?.window?.decorView?.apply {
// Calling setSystemUiVisibility() with a value of 0 clears
// all flags.
systemUiVisibility = 0
}
Java
View decorView = getActivity().getWindow().getDecorView();
// Calling setSystemUiVisibility() with a value of 0 clears
// all flags.
decorView.setSystemUiVisibility(0);
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Dim the system bars (deprecated)\n\n| **Deprecated:** [setSystemUiVisibility](/reference/android/view/View#setSystemUiVisibility(int)) is deprecated in API Level 30\n\nThis lesson describes how to dim the system bars (that is, the status and the navigation\nbars) on Android 4.0 (API level 14) and higher. Android does not provide a built-in way to dim the\nsystem bars on earlier versions.\n\nWhen you use this approach, the content doesn't resize, but the icons in the system bars\nvisually recede. As soon as the user touches either the status bar or the navigation bar area of\nthe screen, both bars become fully visible. The advantage of this\napproach is that the bars are still present but their details are obscured, thus\ncreating an immersive experience without sacrificing easy access to the bars.\n\nDim the Status and Navigation Bars\n----------------------------------\n\nYou can dim the status and navigation bars using the\n[SYSTEM_UI_FLAG_LOW_PROFILE](/reference/android/view/View#SYSTEM_UI_FLAG_LOW_PROFILE) flag, as follows: \n\n### Kotlin\n\n```kotlin\n// This example uses decor view, but you can use any visible view.\nactivity?.window?.decorView?.apply {\n systemUiVisibility = View.SYSTEM_UI_FLAG_LOW_PROFILE\n}\n```\n\n### Java\n\n```java\n// This example uses decor view, but you can use any visible view.\nView decorView = getActivity().getWindow().getDecorView();\nint uiOptions = View.SYSTEM_UI_FLAG_LOW_PROFILE;\ndecorView.setSystemUiVisibility(uiOptions);\n```\n\nAs soon as the user touches the status or navigation bar, the flag is cleared,\ncausing the bars to be undimmed. Once the flag has been cleared, your app needs to reset\nit if you want to dim the bars again.\n\nFigure 1 shows a gallery image in which the navigation bar is dimmed (note that the Gallery app\ncompletely hides the status bar; it doesn't dim it). Notice that the navigation bar (right\nside of the image) has faint white dots on it to represent the navigation controls:\n\n\n**Figure 1.** Dimmed system bars.\n\nFigure 2 shows the same gallery image, but with the system bars displayed:\n\n\n**Figure 2.** Visible system bars.\n\nReveal the Status and Navigation Bars\n-------------------------------------\n\nIf you want to programmatically clear flags set with\n[setSystemUiVisibility()](/reference/android/view/View#setSystemUiVisibility(int)), you can do so\nas follows: \n\n### Kotlin\n\n```kotlin\nactivity?.window?.decorView?.apply {\n // Calling setSystemUiVisibility() with a value of 0 clears\n // all flags.\n systemUiVisibility = 0\n}\n```\n\n### Java\n\n```java\nView decorView = getActivity().getWindow().getDecorView();\n// Calling setSystemUiVisibility() with a value of 0 clears\n// all flags.\ndecorView.setSystemUiVisibility(0);\n```"]]