Android 12.0 imitates the hotseat effect of ios to modify the hotseat style

1 Overview

Recently, due to the needs of 12.0 product project requirements, the layout style of the system’s native Launcher is very general, so it is necessary to redesign the ui to adjust the layout style. The product feels particularly beautiful when seeing the hotseat effect of ios, so it does not need a horizontal screen to imitate
ios The full effect can be displayed in the center, so it depends on the specific layout of the hotseat.
The rendering is as follows:

 

2. Imitate the hotseat effect of ios and modify the core class of the hotseat style

packages/apps/Launcher3/res/layout/launcher.xml
packages/apps/Launcher3/src/com/android/launcher3/Hotseat.java

3. Imitate the hotseat effect of ios and modify the core function implementation and analysis of the hotseat style
3.1 The first choice is to look at the relevant source code analysis of laucher.

First analyze the hotseat layout in the relevant source code in laucher.xml mainly

<com.android.launcher3.LauncherRootView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:launcher="http://schemas.android.com/apk/res-auto"
    android:id="@+id/launcher"
    android:layout_width="match_parent"
    android:

Guess you like

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