From a564ac2d81e94d27e2853891e70fef742fe55b5f Mon Sep 17 00:00:00 2001 From: Petru Date: Mon, 19 Aug 2013 15:44:39 +0300 Subject: [PATCH] Add alarm wip Creates activity for adding alarms --- AndroidManifest.xml | 1 + res/layout/add_alarm.xml | 16 ++++++++++++++ res/menu/add_alarm.xml | 9 ++++++++ src/ro/ieval/unical/AddAlarmActivity.java | 22 +++++++++++++++++++ src/ro/ieval/unical/DisplayEventActivity.java | 2 +- 5 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 res/layout/add_alarm.xml create mode 100644 res/menu/add_alarm.xml create mode 100644 src/ro/ieval/unical/AddAlarmActivity.java diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 25a418b..d7c2032 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -26,6 +26,7 @@ + diff --git a/res/layout/add_alarm.xml b/res/layout/add_alarm.xml new file mode 100644 index 0000000..ea4959f --- /dev/null +++ b/res/layout/add_alarm.xml @@ -0,0 +1,16 @@ + + + + + + + \ No newline at end of file diff --git a/res/menu/add_alarm.xml b/res/menu/add_alarm.xml new file mode 100644 index 0000000..80a3a14 --- /dev/null +++ b/res/menu/add_alarm.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/src/ro/ieval/unical/AddAlarmActivity.java b/src/ro/ieval/unical/AddAlarmActivity.java new file mode 100644 index 0000000..b4833a7 --- /dev/null +++ b/src/ro/ieval/unical/AddAlarmActivity.java @@ -0,0 +1,22 @@ +package ro.ieval.unical; + +import android.app.ListActivity; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuInflater; + +public class AddAlarmActivity extends ListActivity { + @Override + protected void onCreate(final Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.add_alarm); + setTitle(R.string.add_alarm); + } + + @Override + public boolean onCreateOptionsMenu(final Menu menu) { + final MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.add_alarm, menu); + return true; + } +} diff --git a/src/ro/ieval/unical/DisplayEventActivity.java b/src/ro/ieval/unical/DisplayEventActivity.java index af4fe15..45da8dc 100644 --- a/src/ro/ieval/unical/DisplayEventActivity.java +++ b/src/ro/ieval/unical/DisplayEventActivity.java @@ -82,7 +82,7 @@ public class DisplayEventActivity extends Activity { AddEventActivity.editEvent(DisplayEventActivity.this,event); return true; case R.id.add_alarm: - + startActivity(new Intent(this,AddAlarmActivity.class)); return true; default: return true; -- 2.39.2