--- /dev/null
+<?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>
+++ /dev/null
-<?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>
<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>
@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;
}
final Intent i=new Intent(this,AddEventActivity.class);
startActivity(i);
return true;
+ case R.id.refresh:
+ displayEvents();
+ return true;
default:
return false;
}