Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/180.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将左侧导航栏放置在状态栏后面?-SystemUI-Android-AOSP_Android_Android Source_Android Windowmanager - Fatal编程技术网

如何将左侧导航栏放置在状态栏后面?-SystemUI-Android-AOSP

如何将左侧导航栏放置在状态栏后面?-SystemUI-Android-AOSP,android,android-source,android-windowmanager,Android,Android Source,Android Windowmanager,我已经使用Android AOSP项目中的TYPE_Navigation_Bar_面板将底部导航栏定制为左侧导航栏。但问题是它与状态栏重叠。需要将导航栏放在状态栏后面。我想这是有意的。状态栏的图层类型低于导航类型。这意味着导航视图位于状态栏的前面 /** * Window type: the status bar. There can be only one status bar * window; it is placed at the top of the screen, and al

我已经使用Android AOSP项目中的TYPE_Navigation_Bar_面板将底部导航栏定制为左侧导航栏。但问题是它与状态栏重叠。需要将导航栏放在状态栏后面。

我想这是有意的。状态栏的图层类型低于导航类型。这意味着导航视图位于状态栏的前面

/**
 * Window type: the status bar.  There can be only one status bar
 * window; it is placed at the top of the screen, and all other
 * windows are shifted down so they are below it.
 * In multiuser systems shows on all users' windows.
 */
public static final int TYPE_STATUS_BAR         = FIRST_SYSTEM_WINDOW;
.....
/**
 * Window type: Navigation bar (when distinct from status bar)
 * In multiuser systems shows on all users' windows.
 * @hide
 */
public static final int TYPE_NAVIGATION_BAR = FIRST_SYSTEM_WINDOW+19;

作为漫游,您可以修改导航栏的布局参数。您可以将y设置为
getStatusBarHeight()
并将gravity设置为
gravity.BOTTOM
-从未测试过。

否,这不是导航抽屉,这是使用WindowManager添加的实际导航栏(带有后退、主页和最近的按钮)。