summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2013-08-12 17:27:46 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-12 17:27:47 +0000
commita0bd080a978fd7e9a67436b412f929c5b3cf8854 (patch)
treea4fbda9329e09c542f1b541cd270e21e799ff6ae
parentce0879836ae753cdda3cf45f2b0eb050f27f8258 (diff)
parentfa9e2cc9ccbcd746f5765cb7a0afebcdb60e2973 (diff)
downloadandroid_packages_apps_Snap-a0bd080a978fd7e9a67436b412f929c5b3cf8854.tar.gz
android_packages_apps_Snap-a0bd080a978fd7e9a67436b412f929c5b3cf8854.tar.bz2
android_packages_apps_Snap-a0bd080a978fd7e9a67436b412f929c5b3cf8854.zip
Merge "Add the basic action bar back." into gb-ub-photos-carlsbad
-rw-r--r--res/values-v11/styles.xml24
-rw-r--r--res/values-v13/styles.xml20
-rw-r--r--res/values/styles.xml2
-rw-r--r--src/com/android/camera/CameraActivity.java13
4 files changed, 13 insertions, 46 deletions
diff --git a/res/values-v11/styles.xml b/res/values-v11/styles.xml
deleted file mode 100644
index d4105a34f..000000000
--- a/res/values-v11/styles.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <!-- When an activity requests a theme with an action bar from its manifest,
- the activity preview window created by the system process while the
- real activity is loading will also contain an action bar. Set this to
- NoActionBar and change the theme in onCreate. -->
- <style name="Theme.CameraBase" parent="android:Theme.Holo.NoActionBar.Fullscreen"/>
- <style name="Widget.Button.Borderless" parent="android:Widget.Holo.Button.Borderless"/>
-</resources>
-
diff --git a/res/values-v13/styles.xml b/res/values-v13/styles.xml
deleted file mode 100644
index 10162b09e..000000000
--- a/res/values-v13/styles.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="TextAppearance.DialogWindowTitle" parent="@android:style/TextAppearance.Holo.DialogWindowTitle"/>
- <style name="TextAppearance.Medium" parent="@android:style/TextAppearance.Holo.Medium"/>
-</resources>
-
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8af034474..dede2391b 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -59,7 +59,7 @@
<item name="android:colorBackground">@android:color/black</item>
<item name="android:colorBackgroundCacheHint">@android:color/black</item>
</style>
- <style name="Theme.CameraBase" parent="android:Theme.Black.NoTitleBar.Fullscreen"/>
+ <style name="Theme.CameraBase" parent="android:Theme.Holo"/>
<style name="OnScreenHintTextAppearance">
<item name="android:textColor">@android:color/primary_text_dark</item>
<item name="android:textColorHighlight">#FFFF9200</item>
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index ae2f34562..9ffebc2a6 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -16,6 +16,7 @@
package com.android.camera;
+import android.app.ActionBar;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
@@ -102,6 +103,7 @@ public class CameraActivity extends Activity
private Handler mMainHandler;
private PanoramaViewHelper mPanoramaViewHelper;
private CameraPreviewData mCameraPreviewData;
+ private ActionBar mActionBar;
private class MyOrientationEventListener
extends OrientationEventListener {
@@ -175,6 +177,11 @@ public class CameraActivity extends Activity
@Override
public void onSwitchMode(boolean toCamera) {
mCurrentModule.onSwitchMode(toCamera);
+ if (toCamera) {
+ mActionBar.hide();
+ } else {
+ mActionBar.show();
+ }
}
@Override
@@ -320,6 +327,10 @@ public class CameraActivity extends Activity
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.camera_filmstrip);
+ mActionBar = getActionBar();
+ // Hide action bar first since we are in full screen mode first.
+ mActionBar.hide();
+
if (ApiHelper.HAS_ROTATION_ANIMATION) {
setRotationAnimation();
}
@@ -357,7 +368,7 @@ public class CameraActivity extends Activity
LayoutInflater inflater = getLayoutInflater();
View rootLayout = inflater.inflate(R.layout.camera, null, false);
mRootView = rootLayout.findViewById(R.id.camera_app_root);
- mPanoStitchingPanel = (View) findViewById(R.id.pano_stitching_progress_panel);
+ mPanoStitchingPanel = findViewById(R.id.pano_stitching_progress_panel);
mBottomProgress = (ProgressBar) findViewById(R.id.pano_stitching_progress_bar);
mCameraPreviewData = new CameraPreviewData(rootLayout,
FilmStripView.ImageData.SIZE_FULL,