From: Petru Date: Mon, 19 Aug 2013 12:44:39 +0000 (+0300) Subject: Add alarm wip X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=a564ac2d81e94d27e2853891e70fef742fe55b5f;p=unical.git Add alarm wip Creates activity for adding alarms --- 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;