]> iEval git - unical.git/commitdiff
Replace new event button with no-op add alarm button
authorMarius Gavrilescu <marius@ieval.ro>
Tue, 13 Aug 2013 14:29:11 +0000 (17:29 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Tue, 13 Aug 2013 14:29:11 +0000 (17:29 +0300)
res/menu/event.xml
res/values/strings.xml
src/ro/ieval/unical/DisplayEventActivity.java

index 6a854130d565bbc9996b78be2f5edcb8054a8607..9b40a38db10138e5e3492e1b4338f9eb483870f9 100644 (file)
@@ -3,29 +3,24 @@
     <item android:id="@+id/deleteevent"
           android:icon="@android:drawable/ic_menu_delete"
           android:title="Delete Event"
-          android:visible="true"
           android:titleCondensed="DELETE"
           android:showAsAction="always">
 
     </item>
-    <item android:id="@+id/NewEvent" android:title="New event"
-        android:visible="true" android:showAsAction="ifRoom"
-        android:icon="@android:drawable/ic_menu_add"
-    android:titleCondensed="NEW">
 
-    </item>
     <item android:id="@+id/edit_event"
-            android:title="@string/edit_event"
-            android:visible="true"
-            android:showAsAction="never">
-
+          android:title="@string/edit_event"
+          android:showAsAction="ifRoom">
     </item>
-    <item android:id="@+id/eventlist"
-        android:title="@string/eventlist"
-        android:visible="true"
-        android:showAsAction="never" >
 
+    <item android:id="@+id/eventlist"
+          android:title="@string/eventlist"
+          android:showAsAction="ifRoom">
     </item>
 
-
+       <item android:id="@+id/add_alarm"
+                 android:title="@string/add_alarm"
+                 android:icon="@android:drawable/ic_menu_add"
+                 android:showAsAction="ifRoom">
+       </item>
 </menu>
index 9e87e97084dfbb04682b0e9c940119eaf8f6c077..66692fae9212bcc3db22aac967639564ab6546ac 100644 (file)
@@ -48,6 +48,7 @@
     <string name="refresh">Refresh</string>
     <string name="stop_alarm">Stop Alarm</string>
     <string name="edit_event">Edit Event</string>
+       <string name="add_alarm">Add alarm</string>
 
     <string-array name="repeat_array_s">
         <item>Day</item>
@@ -66,4 +67,4 @@
         <item>Until</item>
         <item>Number of events</item>
     </string-array>
-</resources>
\ No newline at end of file
+</resources>
index 275b2dcaf93c01f64deeb98235a5b3eeaafb1b28..7e2e78f55f29424176a34a346ad440f666ece9eb 100644 (file)
@@ -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;
                }
        }
 }
This page took 0.030767 seconds and 4 git commands to generate.