Hide TableView Entries, Then Show When Searched

You must Login before you can answer or comment on any questions.

As the title says, what I need do is this: I have a table with entries populated from a database. Now, the part need is to hide all the entries, and then make them appear once they are searched using a search bar located above the table.

Is this possible with Titanium? I have no clue where to begin, and I think it's quite a challenge for those who consider themselves learned. So, if you have anything to contribute, even pieces, please do!

Thanks

2 Answers

What you can do is, simply populate a data array with all your rows and use tableView.setData(data) when the search field is focused. When it's blurred, do tableView.setData(null)

Easiest way is to use a Titanium.UI.SearchBar UI.SearchBar

With this, it will search your content, and remove everything... compatible with IOS and android, but don't look the same...

Your Answer

Think you can help? Login to answer this question!