android - search items in database and display dropdown list -


i have following app architecture (generalized simplification):

main layout consists of actionbar custom view , scrollable tabs, , viewpager hosting multiple listfragments. each listfragment has own set of data (1 row = imageview + textview) loaded sqlite database. in actionbar's custom view have "search" edittext.

when user starts typing something, i'd perform "on-the-go" search in database , display matching names (those names should clickable) in form of dropdown list. saw examples how perform search in listview, nothing related database search.

so question is: how display database search results dropdown list , refresh anytime user adds or removes character?

you need implement autocompletetextview. allows suggestions user typing. can bind data searched for, using adapters.

this should solve problem.

an example might helpful can found here.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -