From 55084aed556d98d5ee93d9f4bfe319241ef688a3 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Tue, 13 Aug 2013 17:29:11 +0300 Subject: [PATCH] Replace new event button with no-op add alarm button --- res/menu/event.xml | 25 ++++++-------- res/values/strings.xml | 3 +- src/ro/ieval/unical/DisplayEventActivity.java | 33 +++++++++---------- 3 files changed, 28 insertions(+), 33 deletions(-) diff --git a/res/menu/event.xml b/res/menu/event.xml index 6a85413..9b40a38 100644 --- a/res/menu/event.xml +++ b/res/menu/event.xml @@ -3,29 +3,24 @@ - - - + android:title="@string/edit_event" + android:showAsAction="ifRoom"> - + - + + diff --git a/res/values/strings.xml b/res/values/strings.xml index 9e87e97..66692fa 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -48,6 +48,7 @@ Refresh Stop Alarm Edit Event + Add alarm Day @@ -66,4 +67,4 @@ Until Number of events - \ No newline at end of file + diff --git a/src/ro/ieval/unical/DisplayEventActivity.java b/src/ro/ieval/unical/DisplayEventActivity.java index 275b2dc..7e2e78f 100644 --- a/src/ro/ieval/unical/DisplayEventActivity.java +++ b/src/ro/ieval/unical/DisplayEventActivity.java @@ -66,23 +66,22 @@ public class DisplayEventActivity extends Activity { public boolean onOptionsItemSelected(final MenuItem item) { // Handle item selection switch (item. getItemId()) { - case R.id.NewEvent: - final Intent i=new Intent(this,AddEventActivity.class); - startActivity(i); - return true; - case R.id.deleteevent: - final DeleteEventDialog d=new DeleteEventDialog(event,this); - d.show(getFragmentManager(), "Delete"); - return true; - case R.id.eventlist: - final Intent it=new Intent(this,EventListActivity.class); - startActivity(it); - return true; - case R.id.edit_event: - AddEventActivity.editEvent(DisplayEventActivity.this,event); - return true; - default: - return true; + case R.id.deleteevent: + final DeleteEventDialog d=new DeleteEventDialog(event,this); + d.show(getFragmentManager(), "Delete"); + return true; + case R.id.eventlist: + final Intent it=new Intent(this,EventListActivity.class); + startActivity(it); + return true; + case R.id.edit_event: + AddEventActivity.editEvent(DisplayEventActivity.this,event); + return true; + case R.id.add_alarm: + + return true; + default: + return true; } } } -- 2.39.2