AOSP12隐藏首页搜索框----隐藏google 搜索栏

目录

第一步:修改文件 

第二步:修改文件

第三步:重新编译源码,启动模拟器

第四步、运行效果


第一步:修改文件 

源码文件路径: packages/apps/Launcher3/res/layout/search_container_workspace.xml,将以下内容注释掉:

 <!-- <fragment
        android:name="com.android.launcher3.qsb.QsbContainerView$QsbFragment"
        android:layout_width="match_parent"
        android:tag="qsb_view"
        android:layout_height="match_parent"/> -->

第二步:修改文件

源码文件路径: packages/apps/Launcher3/src/com/android/launcher3/Workspace.java 将以下内容注释掉

     // CellLayout.LayoutParams lp = new CellLayout.LayoutParams(0, 0, firstPage.getCountX(), 1);
        // lp.canReorder = false;
        // if (!firstPage.addViewToCellLayout(qsb, 0, R.id.search_container_workspace, lp, true)) {
        //     Log.e(TAG, "Failed to add to item at (0, 0) to CellLayout");
        // }

第三步:重新编译源码,启动模拟器

make -j16
emulator

第四步、运行效果

相关推荐

  1. android11-隐藏状态栏和导航

    2024-06-13 05:56:01       24 阅读
  2. android 9 Systemui 动态隐藏导航

    2024-06-13 05:56:01       32 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-13 05:56:01       10 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-13 05:56:01       12 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-13 05:56:01       11 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-13 05:56:01       13 阅读

热门阅读

  1. payable介绍, 编写一个转账的测试合约

    2024-06-13 05:56:01       5 阅读
  2. git 常用命令

    2024-06-13 05:56:01       4 阅读
  3. 理解 Vue 中的响应式系统

    2024-06-13 05:56:01       4 阅读
  4. Springer投稿流程——Cybersecurity

    2024-06-13 05:56:01       7 阅读
  5. debian10 arm芯片安装.net6

    2024-06-13 05:56:01       5 阅读
  6. R语言桑基图

    2024-06-13 05:56:01       6 阅读
  7. 开发TEE的踩坑之配置SGX环境

    2024-06-13 05:56:01       4 阅读
  8. vxe-input 本地正常线上环境不显示问题

    2024-06-13 05:56:01       7 阅读