SURFACING APPLICATION SEARCH RESULTS USING THE QUICK SEARCH BOXThe QSB dịch - SURFACING APPLICATION SEARCH RESULTS USING THE QUICK SEARCH BOXThe QSB Việt làm thế nào để nói

SURFACING APPLICATION SEARCH RESULT

SURFACING APPLICATION SEARCH RESULTS USING THE QUICK SEARCH BOX
The QSB (shown in Figure 14-7) is positioned prominently on the home screen. The user can launch it at any time by clicking it or pressing the hardware search key, where one is available.
^..ll ■ 16:50
Android 1.6 (API level 4) introduced the ability to serve your application search results through the universal QSB. By surfacing search results from your applica¬tion through this mechanism, you provide users with an additional access point to your application through live search results.
Surfacing Search Results to the Quick Search Box
To serve your search results to the QSB, you must first implement search functionality within your application, as described in Chapter 8, “Databases and Content Providers.”
To make your results available globally, modify the searchable.xml file that describes the applica¬tion search meta data and add two new attributes:
^ searchSettingsDescription — Used to describe your search results in the Settings menu.
This is what the users will see when browsing to include application results in their searches.
^ includeInGlobalSearch — Set this to true to surface these results to the QSB.


To avoid the possibility of misuse, adding new search providers requires users to opt-in, so your search results will not be automatically surfaced directly to the QSB.
For users to add your application’s search results to their QSB search, they must opt-in using the sys¬tem settings, as shown in Figure 14-8. From the QSB Activity, they must select Menu i Settings i Searchable Items and tick the check boxes alongside each Provider they want to enable.
Because search result surfacing in the QSB is strictly opt-in, you should consider notifying your users that this additional functionality is available. 
■ Apps
Names of installed applications i^r
Books
Books in your library ¡yr
% i Browser
Bookmarks and web history ✓
« ; Dropbox
Search my Dropbox
■ Finance
Stock bckers, company names
Foursquare
Search Places and Friends
I IMDb
I IMDb 3T
IB 1 Market
1 Apps from Android Market
^.,ll ■ 16:56

FIGURE 14-8
Adding the Earthquake Example Search Results to the Quick Search Box
To surface search results from the Earthquake project to the QSB, edit the searchable.xml file in your res/xml resources folder. Add a new attribute, setting includelnGlobalSearch to true:
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
SURFACING APPLICATION SEARCH RESULTS USING THE QUICK SEARCH BOXThe QSB (shown in Figure 14-7) is positioned prominently on the home screen. The user can launch it at any time by clicking it or pressing the hardware search key, where one is available.^..ll ■ 16:50Android 1.6 (API level 4) introduced the ability to serve your application search results through the universal QSB. By surfacing search results from your applica¬tion through this mechanism, you provide users with an additional access point to your application through live search results.Surfacing Search Results to the Quick Search BoxTo serve your search results to the QSB, you must first implement search functionality within your application, as described in Chapter 8, “Databases and Content Providers.”To make your results available globally, modify the searchable.xml file that describes the applica¬tion search meta data and add two new attributes:^ searchSettingsDescription — Used to describe your search results in the Settings menu.This is what the users will see when browsing to include application results in their searches.^ includeInGlobalSearch — Set this to true to surface these results to the QSB.android:searchSuggestAuthority="com.paad.provider.mysearch"android:searchSuggestIntentAction="android.intent.action.VIEW"android:searchSettingsDescription="@string/search_description"android:includeInGlobalSearch="true">To avoid the possibility of misuse, adding new search providers requires users to opt-in, so your search results will not be automatically surfaced directly to the QSB.For users to add your application’s search results to their QSB search, they must opt-in using the sys¬tem settings, as shown in Figure 14-8. From the QSB Activity, they must select Menu i Settings i Searchable Items and tick the check boxes alongside each Provider they want to enable.Because search result surfacing in the QSB is strictly opt-in, you should consider notifying your users that this additional functionality is available. ■ AppsNames of installed applications i^r BooksBooks in your library ¡yr% i BrowserBookmarks and web history ✓« ; DropboxSearch my Dropbox ■ FinanceStock bckers, company names FoursquareSearch Places and Friends I IMDbI IMDb 3TIB 1 Market1 Apps from Android Market ^.,ll ■ 16:56FIGURE 14-8Adding the Earthquake Example Search Results to the Quick Search BoxTo surface search results from the Earthquake project to the QSB, edit the searchable.xml file in your res/xml resources folder. Add a new attribute, setting includelnGlobalSearch to true:
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
Mặt KẾT QUẢ TÌM KIẾM DỤNG SỬ DỤNG TÌM NHANH BOX
Các QSB (thể hiện trong hình 14-7) là vị trí nổi bật trên màn hình chủ. Người dùng có thể khởi động nó bất cứ lúc nào bằng cách nhấn vào nó hoặc nhấn phím tìm kiếm phần cứng, một trong những nơi có sẵn.
^ .. Ll ■ 16:50
Android 1.6 (API cấp 4) giới thiệu khả năng để phục vụ cho kết quả tìm kiếm ứng dụng của bạn thông qua việc phổ QSB. Bởi bề mặt kết quả tìm kiếm từ applica¬tion của bạn thông qua cơ chế này, bạn cung cấp cho người dùng với một điểm truy cập bổ sung cho ứng dụng của bạn thông qua kết quả tìm kiếm sống.
Kết quả tìm kiếm Mặt để Hộp tìm kiếm nhanh
để phục vụ cho kết quả tìm kiếm của bạn vào QSB, bạn phải thực hiện đầu tiên chức năng tìm kiếm trong ứng dụng của bạn, như được mô tả trong chương 8, ". Cơ sở dữ liệu và cung cấp nội dung"
Để làm cho kết quả của bạn có sẵn trên toàn cầu, sửa đổi các tập tin searchable.xml mô tả các dữ liệu meta tìm kiếm applica¬tion và thêm hai thuộc tính mới:
^ searchSettingsDescription - . được sử dụng để mô tả các kết quả tìm kiếm của bạn vào menu Settings
Đây là những gì mà người dùng sẽ nhìn thấy khi duyệt web để bao gồm kết quả ứng dụng trong tìm kiếm của họ.
^ includeInGlobalSearch - Thiết lập này để thực đưa ra được những kết quả cho QSB.
android:searchSuggestAuthority="com.paad.provider.mysearch"
android:searchSuggestIntentAction="android.intent.action.VIEW"
android:searchSettingsDescription="@string/search_description"
android:includeInGlobalSearch="true">

Để tránh khả năng lạm dụng, thêm vào các nhà cung cấp tìm kiếm mới yêu cầu người dùng phải chọn tham gia, vì vậy kết quả tìm kiếm của bạn sẽ không được tự động nổi lên trực tiếp vào QSB.
Đối với người dùng thêm các kết quả tìm kiếm của ứng dụng của bạn để tìm kiếm QSB của họ, họ phải lựa chọn sử dụng các thiết lập sys¬tem, như thể hiện trong hình 14-8. Từ Lần QSB, họ phải chọn Menu i Cài đặt i Searchable mục và đánh dấu vào hộp kiểm bên cạnh mỗi nhà cung cấp họ muốn kích hoạt.
Bởi vì kết quả tìm kiếm bề mặt trong QSB là đúng opt-in, bạn nên xem xét thông báo cho người dùng của bạn rằng chức năng bổ sung này có sẵn. 
■ Apps
tên của các ứng dụng được cài đặt i ^ r
Sách
Sách trong thư viện của bạn ¡yr
% i trình duyệt
Bookmarks và lịch sử web ✓
«; Dropbox
Tìm Dropbox của tôi
■ Tài chính
bckers Cổ, tên công ty
Foursquare
Tìm kiếm địa điểm và bạn bè
tôi IMDb
tôi IMDb 3T
IB 1 thị trường
1 Ứng dụng từ Android Market
. ^, Sẽ ■ 16:56 Hình 14-8 Thêm Earthquake Ví dụ Kết quả tìm kiếm cho nhanh Search Box để bề mặt kết quả tìm kiếm từ các dự án động đất vào QSB, chỉnh sửa các tập tin searchable.xml trong thư mục res / nguồn xml của bạn. Thêm một thuộc tính mới, thiết includelnGlobalSearch true:




đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2025 I Love Translation. All reserved.

E-mail: