Android Launcher 去掉全部应用界面的搜索框

Posted 王睿丶

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android Launcher 去掉全部应用界面的搜索框相关的知识,希望对你有一定的参考价值。

packages/apps/Launcher3/res/layout/search_container_all_apps.xml

【思路】
将搜索框的宽度和高度设成0dp即可

<com.android.launcher3.allapps.search.AppsSearchContainerLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@id/search_container_all_apps"
+    android:layout_width="0dp"
+    android:layout_height="0dp"
    android:layout_centerHorizontal="true"
    android:layout_gravity="top|center_horizontal"
    android:background="@drawable/bg_all_apps_searchbox"
    android:elevation="1dp"
    android:focusableInTouchMode="true"
    android:gravity="center"
    android:hint="@string/all_apps_search_bar_hint"
    android:imeOptions="actionSearch|flagNoExtractUi"
    android:inputType="text|textNoSuggestions|textCapWords"
    android:maxLines="1"
    android:padding="8dp"
    android:saveEnabled="false"
    android:scrollHorizontally="true"
    android:singleLine="true"
    android:textColor="?android:attr/textColorSecondary"
    android:textColorHint="@drawable/all_apps_search_hint"
    android:textSize="16sp" />

Launcher 开发系列:
Launcher 在底部导航栏添加一个“☰”按钮,点击弹出全部应用
Launcher 修改底部导航虚拟按键的位置
Launcher 隐藏和开启底部虚拟按键(动态更改)
Launcher 去掉全部应用界面的搜索框
Launcher 点击鼠标右键时,显示菜单栏
Launcher 自定义一个虚拟按键实现返回主页和打开全部应用两个功能

以上是关于Android Launcher 去掉全部应用界面的搜索框的主要内容,如果未能解决你的问题,请参考以下文章

Android 11.0 删除全部应用界面的搜索框

Android Launcher 去除上拉进入全部应用

Android Launcher 自定义一个虚拟按键实现返回主页和打开全部应用两个功能

Android Launcher 在底部导航栏添加一个“☰”按钮,点击弹出全部应用

android 11 Launcher3去掉抽屉

android HOME界面与launcher关系是啥?怎么做launcher