Android 13.0 SystemUI sets the system navigation bar to default to system gesture navigation

1 Overview

In the development of native system products in 13.0, the system navigation bar can support gesture navigation after 10.0. However, the system navigation bar defaults to three-key navigation. The Home, Back, Recent and three keys are displayed at the bottom, but for some full-screen apps, it feels difficult to operate
. It is not very convenient, so the product needs to require the navigation bar to be set to system gesture navigation. Then the bottom of the system will not be occupied.

2.SystemUI sets the system navigation bar to default to the system gesture navigation core class

frameworks\base\core\res\res\values\config.xml
frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java

3.SystemUI sets the system navigation bar to default to system gesture navigation core function analysis and implementation

By using gesture models for system navigation, we can give your app more screens. This helps the application create a more immersive experience for your users.
Users will be able to select the navigation mode of their choice on most devices. The existing three-key navigation mode (including return, home page, recent status) will continue to exist.
It is required on all devices starting from 10. Starting from 10.0, gesture navigation can have two types of three-key navigation and system gesture navigation. Therefore, if it needs to be
set as the default gesture navigation function, it is necessary to set relevant properties in the system DatabaseHelper to complete the function.

The configuration of setting default gestures in frameworks is defined in config.xml. Next, look at the relevant source code in config.xml.
How to set system gestures as the default navigation method?
The first step is in config.xml.

The path is: frameworks\base\core\res\res\values\config.xml

   <integer name="config_navBarOpac

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/133205468