Since the early days of Android, the system has managed a UI component known as the status bar, which resides at the top of handset devices to deliver information such as the carrier signal, time, notifications, and so on. Android 3.0 added the system bar for tablet devices, which resides at the bottom of the screen to provide system navigation controls (Home, Back, and so forth) and also an interface for elements traditionally provided by the status bar. In Android 4.0, the system provides a new type of system UI called the navigation bar. You might consider the navigation bar a re-tuned version of the system bar designed for handsets—it provides navigation controls for devices that don’t have hardware counterparts for navigating the system, but it leaves out the system bar's notification UI and setting controls. As such, a device that provides the navigation bar also has the status bar at the top.
To this day, you can hide the status bar on handsets using the FLAG_FULLSCREEN flag. In Android 4.0, the APIs that control the system bar’s visibility have been updated to better reflect the behavior of both the system bar and navigation bar:
The SYSTEM_UI_FLAG_LOW_PROFILE flag replaces the STATUS_BAR_HIDDEN flag. When set, this flag enables “low profile" mode for the system bar or navigation bar. Navigation buttons dim and other elements in the system bar also hide. Enabling this is useful for creating more immersive games without distraction for the system navigation buttons.
The SYSTEM_UI_FLAG_VISIBLE flag replaces the STATUS_BAR_VISIBLE flag to request the system bar or navigation bar be visible.
The SYSTEM_UI_FLAG_HIDE_NAVIGATION is a new flag that requests the navigation bar hide completely. Be aware that this works only for the navigation bar used by some handsets (it does not hide the system bar on tablets). The navigation bar returns to view as soon as the system receives user input. As such, this mode is useful primarily for video playback or other cases in which the whole screen is needed but user input is not required.
You can set each of these flags for the system bar and navigation bar by calling setSystemUiVisibility() on any view in your activity. The window manager combines (OR-together) all flags from all views in your window and apply them to the system UI as long as your window has input focus. When your window loses input focus (the user navigates away from your app, or a dialog appears), your flags cease to have effect. Similarly, if you remove those views from the view hierarchy their flags no longer apply.
To synchronize other events in your activity with visibility changes to the system UI (for example, hide the action bar or other UI controls when the system UI hides), you should register a View.OnSystemUiVisibilityChangeListener to be notified when the visibility of the system bar or navigation bar changes.
See the OverscanActivity class for a demonstration of different system UI options.
2012.06.11 23:09:20
선후
NoBrain님 감사합니다^^
해보니까 하단의 네비게이션바가 완전히 사라져버리네요^^
그런데 터치를 하니까 다시 돌아와버려요 ㅠㅠ
제가 다른것을보니까 하단의 버튼을이 기존이미지(백, 홈, 멀티테스킹?)에서
3가지 모두다 ' ● ' 이런 점으로 바뀌던 앱이 있었거든요
이렇게 점으로 있따가 제가 터치하면 원래이미지로 돌아오고 동작하게 되더라구요
이런 기능은 음.... 어떻게 하면 되는지 모르겠네요 ㅠㅠ
2012.06.11 23:32:12
NoBrain
(추천:
1 / 0)
View.SYSTEM_UI_FLAG_LOW_PROFILE
요거 안되나요? 다른 곳에서는 예제로 이거 하면 점으로 바뀐다던데요..태블릿에서만 그러나..
안드로이드 SDK 4.0 Change Log 발췌입니다.
-------------------------------------------------------
Controls for system UI visibility
Since the early days of Android, the system has managed a UI component known as the status bar, which resides at the top of handset devices to deliver information such as the carrier signal, time, notifications, and so on. Android 3.0 added the system bar for tablet devices, which resides at the bottom of the screen to provide system navigation controls (Home, Back, and so forth) and also an interface for elements traditionally provided by the status bar. In Android 4.0, the system provides a new type of system UI called the navigation bar. You might consider the navigation bar a re-tuned version of the system bar designed for handsets—it provides navigation controls for devices that don’t have hardware counterparts for navigating the system, but it leaves out the system bar's notification UI and setting controls. As such, a device that provides the navigation bar also has the status bar at the top.
To this day, you can hide the status bar on handsets using the
FLAG_FULLSCREENflag. In Android 4.0, the APIs that control the system bar’s visibility have been updated to better reflect the behavior of both the system bar and navigation bar:SYSTEM_UI_FLAG_LOW_PROFILEflag replaces theSTATUS_BAR_HIDDENflag. When set, this flag enables “low profile" mode for the system bar or navigation bar. Navigation buttons dim and other elements in the system bar also hide. Enabling this is useful for creating more immersive games without distraction for the system navigation buttons.SYSTEM_UI_FLAG_VISIBLEflag replaces theSTATUS_BAR_VISIBLEflag to request the system bar or navigation bar be visible.SYSTEM_UI_FLAG_HIDE_NAVIGATIONis a new flag that requests the navigation bar hide completely. Be aware that this works only for the navigation bar used by some handsets (it does not hide the system bar on tablets). The navigation bar returns to view as soon as the system receives user input. As such, this mode is useful primarily for video playback or other cases in which the whole screen is needed but user input is not required.You can set each of these flags for the system bar and navigation bar by calling
setSystemUiVisibility()on any view in your activity. The window manager combines (OR-together) all flags from all views in your window and apply them to the system UI as long as your window has input focus. When your window loses input focus (the user navigates away from your app, or a dialog appears), your flags cease to have effect. Similarly, if you remove those views from the view hierarchy their flags no longer apply.To synchronize other events in your activity with visibility changes to the system UI (for example, hide the action bar or other UI controls when the system UI hides), you should register a
View.OnSystemUiVisibilityChangeListenerto be notified when the visibility of the system bar or navigation bar changes.See the OverscanActivity class for a demonstration of different system UI options.