summaryrefslogtreecommitdiffstats
path: root/res/menu/main_activity.xml
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-08-16 21:45:49 +0200
committerGravatar Tom Willemsen2012-08-16 21:45:49 +0200
commitb2a1b4aec0e1e3d5fb96401fe41bc27547817748 (patch)
tree6c32758612321fc900c306a9baa365e61bda8196 /res/menu/main_activity.xml
parentf30b4fcd3a525d2fa3c2d85fb11e8e7aa3a6a031 (diff)
downloaddvdroid-b2a1b4aec0e1e3d5fb96401fe41bc27547817748.tar.gz
dvdroid-b2a1b4aec0e1e3d5fb96401fe41bc27547817748.zip
Add search functionalityHEADmaster
* AndroidManifest.xml: Register `DVDroidActivity' as searchable. * res/drawable-hdpi/menu_search.png: * res/drawable-mdpi/menu_search.png: New icons. * res/menu/main_activity.xml: Add a search icon to the main activity's action menu. * res/values/strings.xml: Add strings "search_hint" and "menu_search". * res/xml/searchable.xml: New configuration file. * src/ryuslash/org/dvdroid/DVDDataSource.java (getQuery): New function. * src/ryuslash/org/dvdroid/DVDroidActivity.java (getData): New overload, calls `getQuery' to search for something instead of everything. (onCreate): If a search has been started, search, don't just show everything. (onCreateOptionsMenu): Instantiate the `SearchView' in order to use it.
Diffstat (limited to 'res/menu/main_activity.xml')
-rw-r--r--res/menu/main_activity.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/res/menu/main_activity.xml b/res/menu/main_activity.xml
index d2f94bd..ddb7d7a 100644
--- a/res/menu/main_activity.xml
+++ b/res/menu/main_activity.xml
@@ -4,4 +4,9 @@
android:title="@string/main_menu_add"
android:showAsAction="ifRoom|withText"
android:icon="@drawable/add" />
+ <item android:id="@+id/menu_search"
+ android:title="@string/menu_search"
+ android:icon="@drawable/menu_search"
+ android:showAsAction="collapseActionView|ifRoom"
+ android:actionViewClass="android.widget.SearchView" />
</menu>