The status bar at the bottom of the Android 4.0 desktop consists of three navigation keys on the left: The Return key, the Home key, and the RecentApplication key, which are used to view all recently opened applications, multi-task switching is here. The three keys are called NavigationArea, that is, the navigation area. The rightmost is icationicationarea, that is, the prompt area, which displays power, wireless signals, Bluetooth, and other information. This StatusBar is shown at the bottom of the screen no matter which program is opened.
The customer's requirements need to hide the status bar at the bottom. You can simply press the physical button to perform operations. These virtual buttons and status navigation on the right are all hidden. I initially thought it was implemented in the Launcher. After reading the code for more than half an hour, I couldn't find any icon for a return button. If you want to open any program, the system UI should be shown below, and I will try (frameworks/base/packages/SystemUI/res) the drawable below finds the "Return key" icon and finds it. The java class to which the icon belongs is TabletStatusBar. java (frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet). You can find the makeStatusBarView () method under this class.
// The navigation buttons
MBackButton = (ImageView) sb. findViewById (R. id. back );
MNavigationArea = (ViewGroup) sb. findViewById (R. id. navigationArea );
MHomeButton = mNavigationArea. findViewById (R. id. home );
MMenuButton = mNavigationArea. findViewById (R. id. menu );
MRecentButton = mNavigationArea. findViewById (R. id. recent_apps );
MRecentButton. setOnClickListener (mOnClickListener); here you will know what the system has done. I continued to look up the View object sb which was originally referenced here.
Final TabletStatusBarView sb = (TabletStatusBarView) View. inflate (context, R. layout. status_bar, null); TabletStatusBarView. the java class inherits FrameLayout. You can set its hidden or display attributes here. The underlying event transfer principle of virtual buttons will be presented later.
Author: LuoXianXion