Commit graph

4 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
f30b4fcd3a Add edit and delete functionality
* res/values/strings.xml: Add strings for `main_context_menu_edit' and
  `main_context_menu_delete'.

* src/ryuslash/org/dvdroid/AddDVDActivity.java (saveDVD): Renamed from
  `createDVD'.  When ID is greater than 0 update, otherwise create.

  (onCreate): Get ID from the `Intent' that was used to start this
  activity.  If ID is greater than 0, show known information in the
  inputs.

* src/ryuslash/org/dvdroid/DVDDataSource.java:
  (createValues):
  (updateDVD):
  (getById): New functions.

  (createDVD): Use `createValues' to get the values for the database.

  (deleteDVD): Add overloaded function that takes a `long', make the
  original function use this to delete a `DVD'.

* src/ryuslash/org/dvdroid/DVDroidActivity.java: Implement
  `ActionMode.Callback'.

  (onActivityResult): If REQUESTCODE is `2' reset the intent
  information so as not to confuse it during its next invocation.
  Finish action mode.

  (onActionItemClicked):
  (onCreateActionMode):
  (onDestroyActionMode):
  (onListItemClick):
  (onPrepareActionMode):
  (reloadList):
  (showEditDVD): New functions.

  (onCreate): Instantiate the ADD_DVD `Intent'.
2012-08-10 22:03:34 +02:00
2689fd0c50 Add icons to action bar items 2012-08-10 20:08:50 +02:00
073ad25e61 Initial commit 2012-08-08 02:16:57 +02:00