【发布时间】:2012-08-16 14:58:59
【问题描述】:
当我调用 onSearchRequested() 时,屏幕顶部会出现一个搜索栏,左侧是我的应用程序徽标。我想将此图标更改为与搜索上下文有关的另一个图标...这可能吗?
【问题讨论】:
标签: android search android-actionbar
当我调用 onSearchRequested() 时,屏幕顶部会出现一个搜索栏,左侧是我的应用程序徽标。我想将此图标更改为与搜索上下文有关的另一个图标...这可能吗?
【问题讨论】:
标签: android search android-actionbar
根据SDK,没有这样的方法可以做到这一点。显然它拿起了应用程序的标志。
但是您可以更改描述。
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_name"
android:hint="@string/settings_description"
android:includeInGlobalSearch="true"
android:searchSettingsDescription="@string/settings_description"
android:voiceSearchMode="showVoiceSearchButton|launchRecognizer"
>
</searchable>
【讨论】: