From e8df341197ea79776a0376fbdcce9d4360561bb5 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Wed, 8 Aug 2012 23:05:19 +0200 Subject: [PATCH] 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. --- res/layout/add.xml | 7 ---- res/layout/main.xml | 7 ---- res/menu/add_activity.xml | 6 +++ res/menu/main_activity.xml | 6 +++ res/values/strings.xml | 4 +- src/ryuslash/org/dvdroid/AddDVDActivity.java | 28 +++++++++++-- src/ryuslash/org/dvdroid/DVDroidActivity.java | 39 +++++++++++++++---- 7 files changed, 70 insertions(+), 27 deletions(-) create mode 100644 res/menu/add_activity.xml create mode 100644 res/menu/main_activity.xml diff --git a/res/layout/add.xml b/res/layout/add.xml index 22430f3..4ca4627 100644 --- a/res/layout/add.xml +++ b/res/layout/add.xml @@ -20,11 +20,4 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/watched_entry" /> - -