如何在AOSP设置应用中移除搜索按钮。

huangapple go评论94阅读模式
英文:

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 中删除搜索栏

&lt;include layout=&quot;@layout/search_bar&quot;/&gt;
英文:

Delete the searchbar from packages/apps/Settings/res/layout/settings_homepage_container.xml

&lt;include layout=&quot;@layout/search_bar&quot;/&gt;

huangapple
  • 本文由 发表于 2020年10月23日 17:48:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/64497729.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定