android 12.0Hotseat Add allapp button

1 Overview

In the customized development of 12.0 products, in the customized development of laucher3, there is a requirement to add an allapp button in the hotseat function. Click the button to enter all app pages, that is, put an allapp function key among several function buttons of hotseat to realize clicking Enter the app list page

2. Hotseat adds allapp button related code

packages/apps/Launcher3/res/xml/partner_default_layout.xml
packages/apps/Launcher3/src/com/android/launcher3/Hotseat.java
packages/apps/Launcher3/src/com/android/launcher3/Launcher.java

3. Hotseat added allapp button related function analysis and implementation

The specific customization is as follows:
Add the required resource files as follows:

1 all_apps_button.xml

<?xml version="1.0" encoding="utf-8"?>
<TextView style="@style/BaseIcon" />

all_apps_button_icon.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_focused="true" android

Guess you like

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