Android 8.0 隐藏状态栏和导航栏

Posted 王睿丶

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android 8.0 隐藏状态栏和导航栏相关的知识,希望对你有一定的参考价值。

frameworks\\base\\core\\res\\res\\values-sw900dp\\dimens.xml

<resources>

    <!-- Height of the bottom navigation / system bar. -->
--    <dimen name="navigation_bar_height">56dp</dimen>
++    <dimen name="navigation_bar_height">0dp</dimen>

    <!-- Height of the bottom navigation bar in landscape; often
         the same as @dimen/navigation_bar_height -->
--    <dimen name="navigation_bar_height_landscape">56dp</dimen>
++    <dimen name="navigation_bar_height_landscape">0dp</dimen>

</resources>

frameworks\\base\\core\\res\\res\\values-sw600dp\\dimens.xml

--    <dimen name="navigation_bar_height_portrait">56dp</dimen>
++    <dimen name="navigation_bar_height_portrait">0dp</dimen>

frameworks\\base\\core\\res\\res\\values\\dimens.xml

    <!-- Height of the status bar -->
--    <dimen name="status_bar_height">24dp</dimen>
++    <dimen name="status_bar_height">0dp</dimen>
    <!-- Height of the bottom navigation / system bar. -->
--    <dimen name="navigation_bar_height">48dp</dimen>
++    <dimen name="navigation_bar_height">0dp</dimen>
    <!-- Height of the bottom navigation bar in portrait; often the same as @dimen/navigation_bar_height -->
--    <dimen name="navigation_bar_height_landscape">48dp</dimen>
++    <dimen name="navigation_bar_height_landscape">0dp</dimen>
    <!-- Width of the navigation bar when it is placed vertically on the screen -->
--    <dimen name="navigation_bar_width">48dp</dimen>
++    <dimen name="navigation_bar_width">0dp</dimen>
    <!-- Height of the bottom navigation / system bar in car mode. -->
--    <dimen name="navigation_bar_height_car_mode">96dp</dimen>
++    <dimen name="navigation_bar_height_car_mode">0dp</dimen>
    <!-- Height of the bottom navigation bar in portrait; often the same as
         @dimen/navigation_bar_height_car_mode -->
--    <dimen name="navigation_bar_height_landscape_car_mode">96dp</dimen>
++    <dimen name="navigation_bar_height_landscape_car_mode">0dp</dimen>
    <!-- Width of the navigation bar when it is placed vertically on the screen in car mode -->
--    <dimen name="navigation_bar_width_car_mode">96dp</dimen>
++    <dimen name="navigation_bar_width_car_mode">0dp</dimen>
    <!-- Height of notification icons in the status bar -->
--    <dimen name="status_bar_icon_size">24dip</dimen>
++    <dimen name="status_bar_icon_size">0dip</dimen>
    <!-- Size of the giant number (unread count) in the notifications -->
--    <dimen name="status_bar_content_number_size">48sp</dimen>
++    <dimen name="status_bar_content_number_size">0sp</dimen>
    <!-- Margin at the edge of the screen to ignore touch events for in the windowshade. -->
--    <dimen name="status_bar_edge_ignore">5dp</dimen>
++    <dimen name="status_bar_edge_ignore">0dp</dimen>

以上是关于Android 8.0 隐藏状态栏和导航栏的主要内容,如果未能解决你的问题,请参考以下文章

Android基础篇 显示隐藏状态栏和导航栏

Android 弹出Dialog时隐藏状态栏和底部导航栏

iOS导航栏和状态栏

点击设备时如何隐藏状态栏和导航栏

Android 沉浸式/透明式状态栏、导航栏

隐藏状态栏和导航栏位置