英文:
How to remove search button in AOSP Settings app
问题
我正在为一款仅运行一个应用程序的定制设备构建AOSP。设备的用户应能够连接到WiFi,但不能进行其他任何设置更改。
不幸的是,Android 10的设置应用程序在操作栏中有一个搜索按钮(见截图)。从这里,用户可以跳转到设置中的任何其他菜单。
我想移除这个搜索按钮,但是我找不到它被插入的位置。看起来它是由PreferenceScreen动态创建的。
有人知道在哪里找到它。
英文:
I am building AOSP for a custom device which is running only one app. The user of the device should be able to connect to wifi, but not to be able to make any other settings.
Unfortunately the settings app of Android 10 has this search button in the Actionbar (see screenshot). From here the user could jump to any other menu in the settings.
I want to remove the search button but i cant find the place where it is inserted. It looks like that it is dynamically created by PreferenceScreen.
Anyone knows where to find it.
<img src="https://i.stack.imgur.com/SR2U2.png" height="450" >
答案1
得分: 2
从 packages/apps/Settings/res/layout/settings_homepage_container.xml 中删除搜索栏
<include layout="@layout/search_bar"/>
英文:
Delete the searchbar from packages/apps/Settings/res/layout/settings_homepage_container.xml
<include layout="@layout/search_bar"/>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论