Android 12.0仿ios的hotseat效果修改hotseat样式

1.概述

最近在12.0产品项目需求的需要,系统原生Launcher的布局样式很一般,所以需要重新设计ui对布局样式做调整,产品在看到
ios的hotseat效果觉得特别美观,所以要仿ios一样不需要横屏铺满的效果 居中显示就行了,所以就要看hotseat的具体布局显示了
效果图如下:

2.仿ios的hotseat效果修改hotseat样式的核心类

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

3.仿ios的hotseat效果修改hotseat样式的核心功能实现和分析
3.1 首选看下Launcher布局的laucher.xml的相关源码分析

首先分析下hotseat布局 在laucher.xml中的相关源码中主要是

<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:

猜你喜欢

转载自blog.csdn.net/baidu_41666295/article/details/130909057