summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik <roboerik@android.com>2010-07-02 13:45:45 -0700
committerErik <roboerik@android.com>2010-07-02 13:45:45 -0700
commit2051f1275ec5e5eeffe5bbf5773860b855316d95 (patch)
tree43867da59d1156c606f62d9eaf108f9946ee07ca /src
parente5a8f94f935248dea9e515199151472eebe5ca4c (diff)
downloadandroid_packages_apps_Calendar-2051f1275ec5e5eeffe5bbf5773860b855316d95.tar.gz
android_packages_apps_Calendar-2051f1275ec5e5eeffe5bbf5773860b855316d95.tar.bz2
android_packages_apps_Calendar-2051f1275ec5e5eeffe5bbf5773860b855316d95.zip
Adds an action bar to the allInOne Calendar view.
The Action Bar doesn't have any functionality yet, but it provides the setup for creating the bar and adding elements to it. Change-Id: Ie4b6214d88dcb73869e04aeb098737efdacf2a59
Diffstat (limited to 'src')
-rw-r--r--src/com/android/calendar/AllInOneActivity.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/calendar/AllInOneActivity.java b/src/com/android/calendar/AllInOneActivity.java
index 16cab358..3d2778fa 100644
--- a/src/com/android/calendar/AllInOneActivity.java
+++ b/src/com/android/calendar/AllInOneActivity.java
@@ -16,8 +16,10 @@
package com.android.calendar;
+import android.app.ActionBar;
import android.app.Activity;
import android.os.Bundle;
+import android.view.Menu;
public class AllInOneActivity extends Activity {
@Override
@@ -25,4 +27,14 @@ public class AllInOneActivity extends Activity {
super.onCreate(savedInstanceState);
setContentView(R.layout.all_in_one);
}
+
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ super.onCreateOptionsMenu(menu);
+
+ ActionBar actionBar = getActionBar();
+ actionBar.setStandardNavigationMode(getText(R.string.app_label));
+ getMenuInflater().inflate(R.menu.all_in_one_title_bar, menu);
+ return true;
+ }
}