]> iEval git - unical.git/commitdiff
Add refresh to event_list
authorPetru Trimbitas <l3asketballplayer@yahoo.com>
Sat, 15 Jun 2013 15:26:59 +0000 (18:26 +0300)
committerPetru Trimbitas <l3asketballplayer@yahoo.com>
Sat, 15 Jun 2013 15:26:59 +0000 (18:26 +0300)
res/menu/event_list.xml [new file with mode: 0644]
res/menu/main.xml [deleted file]
res/values/strings.xml
src/ro/ieval/unical/EventListActivity.java

diff --git a/res/menu/event_list.xml b/res/menu/event_list.xml
new file mode 100644 (file)
index 0000000..8d1346e
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item android:id="@+id/add_event" android:title="@string/new_event"
+        android:visible="true" android:showAsAction="always"
+        android:icon="@android:drawable/ic_menu_add"
+    android:titleCondensed="NEW">
+
+    </item>
+    <item android:id="@+id/refresh" android:title="@string/refresh"
+        android:icon="@android:drawable/ic_popup_sync"
+        android:showAsAction="ifRoom"></item>
+
+
+</menu>
diff --git a/res/menu/main.xml b/res/menu/main.xml
deleted file mode 100644 (file)
index 757150c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
-    <item android:id="@+id/add_event" android:title="@string/new_event"
-        android:visible="true" android:showAsAction="always"
-        android:icon="@android:drawable/ic_menu_add"
-    android:titleCondensed="NEW">
-
-    </item>
-
-
-</menu>
index 9c1ca70ef9a281c5c76b71129eaaa640519f26a4..6c0ba0740e88356129d87379856ec24a57f741fd 100644 (file)
@@ -45,6 +45,7 @@
     <string name="months">months</string>
     <string name="year">year</string>
     <string name="years">years</string>
+    <string name="refresh">Refresh</string>
 
     <string-array name="repeat_array_s">
         <item>Day</item>
index b8c81ab30ac5fca68609a710715f316b5605397e..d864079bbaa3bfb10b238fa1066179e20ccb7793 100644 (file)
@@ -68,7 +68,7 @@ public class EventListActivity extends Activity {
        @Override
        public boolean onCreateOptionsMenu(final Menu menu) {
                final MenuInflater inflater = getMenuInflater();
-               inflater.inflate(R.menu.main, menu);
+               inflater.inflate(R.menu.event_list, menu);
                return true;
        }
 
@@ -79,6 +79,9 @@ public class EventListActivity extends Activity {
                                final Intent i=new Intent(this,AddEventActivity.class);
                                startActivity(i);
                                return true;
+                       case R.id.refresh:
+                               displayEvents();
+                               return true;
                        default:
                                return false;
                }
This page took 0.029077 seconds and 4 git commands to generate.