Search as the user types

Fixes #323 (closed).

This does away with the separate SearchResult and instead applies the search to the currently viewed tab on the main screen (Available, Installed, Updates). When filtering the Available list, it filters the currently selected category.

Note however that there are still times when the old style SearchDialog will be shown over the top of the action bar rather than the SearchView within the action bar. These times include:

  • When a user with a hardware keyboard starts typing from the main screen.
  • On older devices with a "search" hardware button.
  • Probably some other cases (I think when there is not enough screen real estate, but haven't seen that happen).

In cases where this dialog is shown, filtering the lists as you type does not seem to be an option. I tried to figure out how to do that, but failed. If someone else figures it out, that would be great. However, when the search is submitted, it will hide the SearchDialog and populate the SearchView, focus it, and apply the search appropriately.

There is a script in the F-Droid/tools/ subdirectory which will consecutively send various intents to F-Droid relating to search. This includes Play, market, Amazon search links. For good measure, I also made it send intents to do with viewing app details. This should probably be made into a proper instrumented test at some point, but I didn't have the time to figure out how to do that. Maybe a project for future @pserwylo.

One unknown is the performance implications. There is no problems on my Nexus 4 with Android 5.0. My Chinese/ebay/$30/Android 2.3.4 device seems good enough too.