2017-11-03 19 views
1

SearchViewで連絡先の名前を入力すると、自動募集オプションに次の検索可能なXMLが使用されています。searchviewに名前、番号、連絡先のタイプを表示するには

<?xml version="1.0" encoding="utf-8"?> 
<searchable xmlns:android="http://schemas.android.com/apk/res/android" 
android:label="@string/find_contact" 
android:hint="@string/find_contact" 
android:gravity="center" 
android:includeInGlobalSearch="true" 
android:queryAfterZeroResults="true" 
android:searchMode="queryRewriteFromText" 
android:searchSettingsDescription="@string/find_contact" 
android:searchSuggestAuthority="com.android.contacts" 
android:searchSuggestIntentAction="android.provider.Contacts.SEARCH_SUGGESTION_CLICKED" 
android:searchSuggestIntentData="content://com.android.contacts/contacts/lookup" > 

<!-- allow green action key for search-bar and per-suggestion clicks --> 
<actionkey 
    android:keycode="KEYCODE_CALL" 
    android:queryActionMsg="call" 
    android:suggestActionMsg="call" /> 

私はandroid.support.v7.widget.SearchViewを使用しています。現在、私が検索している連絡先の名前を入力すると、名前と連絡先の画像(存在する場合)のみが候補リストに表示されます。連絡先の番号や連絡先のタイプ(職場、家庭、携帯電話など)を提案リストに表示する方法

+0

あなたがそれを行うことはできません – pskink

答えて

関連する問題