我正在爲我的應用程序實施可搜索功能,並且遇到此問題。我如何更改我的Searchable的默認放大鏡?默認情況看起來很大而且很難看,我更喜歡使用與我的菜單圖標相同的drawable。更改操作欄中的可搜索圖標
在Searchable Configuration - Android Developer網站搜索「圖標」不會導致任何有用的信息。我也嘗試添加android:icon
(這是Structure
選項卡中的一個選項),以我的可搜索定義,但它不起作用。
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:hint="@string/search_hint"
android:icon="@drawable/ic_custom_test"
android:includeInGlobalSearch="true"
android:label="@string/search_label"
android:searchSettingsDescription="@string/settings_description"
android:searchSuggestAuthority="com.test.provider.SuggestionProvider"
android:searchSuggestIntentAction="android.intent.action.VIEW"
android:searchSuggestIntentData="content://com.test.provider.SuggestionProvider/info"
android:searchSuggestSelection=" ?"
android:searchSuggestThreshold="1" >
</searchable>
在此先感謝您的幫助!
你改變了嗎?請幫忙,因爲我在問你的問題。 – Eman87