ankitjaininfo
ankitjaininfo

Reputation: 12362

Google Search Like Widget Example

I am looking for example for Google Search like home page widget from where user can type-in keywords to search within my app. Youtube video here.

I followed the tutorial at the dev guide. However, it lists the available RemoteViews, and there is no EditView. In such case how can I provide a editable text-box. I want to build a widget similar to SearchManager UI, but available as widget at home-screen.

Upvotes: 4

Views: 3200

Answers (3)

Sagar Hatekar
Sagar Hatekar

Reputation: 8790

Search Widget is what you are looking for. There are two ways of implementing it, 1) Using a SearchView (which behaves like, and is an extension of EditText) and 2) using a Search Dialog. I believe, you'd need to use the 1st approach. The linked page has a nice helpful tutorial to get your started.

Upvotes: 0

Moncader
Moncader

Reputation: 3388

As above, EditText is not available for widgets. The video you pointed to is of a fake Android. That is not a real Android device and was made for that video only.

Upvotes: 1

Fedor
Fedor

Reputation: 43412

EditText is not available on widgets. That's why there's no EditText on the search widget. It just looks like EditText. When you click over the search widget it starts another activity with EditText.

Upvotes: 4

Related Questions