android 去除桌面谷歌搜索框

注:
        本文只是博主学习记录分享,仅供参考。如有错误请指出来,谢谢!

一、问题描述

去除 android 系统桌面谷歌搜索栏,前后对比如下图:

系统版本:android12

平台:rk3568

二、参考修改

文件路径:packages/apps/Launcher3/res/layout/search_container_workspace.xml

<com.android.launcher3.qsb.QsbContainerView

        xmlns:android="http://schemas.android.com/apk/res/android"

        android:orientation="vertical"

        android:layout_width="match_parent"

        android:layout_height="0dp"

        android:id="@id/search_container_workspace"

        android:padding="0dp" >

// 注释这一段代码

<!-- <fragment

        android:name="com.android.launcher3.qsb.QsbContainerView$QsbFragment"

        android:layout_width="match_parent"

        android:tag="qsb_view"

        android:layout_height="match_parent"/> -->

</com.android.launcher3.qsb.QsbContainerView>

文件路径:packages/apps/Launcher3/src/com/android/launcher3/Workspace.java

// @Rockchip add two qsb

        if (twoQsb) {

                if (mQsb2 == null) {

                        mQsb2 = LayoutInflater.from(getContext())

.                        inflate(R.layout.search_container_workspace2, firstPage, false);

        }

        // CellLayout.LayoutParams lp2 = new CellLayout.LayoutParams(0, 0, firstPage.getCountX(), 1);

        // lp2.canReorder = false;

        // if (!firstPage.addViewToCellLayout(mQsb2, 1, R.id.search_container_workspace2, lp2, true)) {

        // Log.e(TAG, "Failed to add qsb2 to item at to CellLayout");

        // mQsb2 = null;

        // }

        }

        // @end

注:

        rk 平台需要注释 rk 添加的搜索栏代码

相关推荐

  1. 搜索语法

    2024-04-30 16:32:04       39 阅读
  2. Android 8.1 删除Launcher桌面搜索

    2024-04-30 16:32:04       34 阅读
  3. 地图搜索功能的bug

    2024-04-30 16:32:04       63 阅读
  4. css去除滑动

    2024-04-30 16:32:04       42 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-30 16:32:04       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-30 16:32:04       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-30 16:32:04       87 阅读
  4. Python语言-面向对象

    2024-04-30 16:32:04       96 阅读

热门阅读

  1. 常用的正则表达式组成

    2024-04-30 16:32:04       34 阅读
  2. 第18天 File类

    2024-04-30 16:32:04       36 阅读
  3. canb和cana转换注意事项

    2024-04-30 16:32:04       27 阅读
  4. 【SQL】SQL语句执行顺序

    2024-04-30 16:32:04       37 阅读
  5. ArrayList.remove()方法盲区

    2024-04-30 16:32:04       38 阅读
  6. Mysql - 事务的概念

    2024-04-30 16:32:04       30 阅读