Commit graph

3 commits

Author SHA1 Message Date
b2a1b4aec0 Add search functionality
* 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.
2012-08-16 21:45:49 +02:00
2689fd0c50 Add icons to action bar items 2012-08-10 20:08:50 +02:00
e8df341197 Use actions instead of buttons
* res/layout/add.xml: Remove save_button.

* res/layout/main.xml: Remove add_button.

* res/menu/add_activity.xml:
* res/menu/main_activity.xml: New menus.

* res/values/strings.xml: Rename `add_button' to `main_menu_add' and
  `save_button' to `add_menu_save'.

* src/ryuslash/org/dvdroid/AddDVDActivity.java (createDVD): Renamed
  from `saveDVD', no longer takes a `View' as an argument.  Don't call
  finish in this function.

  (onCreateOptionsMenu):
  (onOptionsItemSelected): New overrides.

* src/ryuslash/org/dvdroid/DVDroidActivity.java (onCreateOptionsMenu):
  (onOptionsItemsSelected): New overrides.

  (showAddDVD): Renamed from `addDVD', no longer takes a `View' as an
  argument.
2012-08-08 23:05:19 +02:00