summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-09-19 17:16:38 -0700
committerWu-cheng Li <wuchengli@google.com>2010-09-20 14:00:57 -0700
commitdf41c36076dce8d68bcb69bc922b057c1bd82ee0 (patch)
treea927149819fc4adf44c36f55f6fa92919d6b296b
parented5ca72866c13c7916fe8a05d5324d9646fc4231 (diff)
downloadLegacyCamera-df41c36076dce8d68bcb69bc922b057c1bd82ee0.tar.gz
LegacyCamera-df41c36076dce8d68bcb69bc922b057c1bd82ee0.tar.bz2
LegacyCamera-df41c36076dce8d68bcb69bc922b057c1bd82ee0.zip
Use theme to display background to reduce perceived latency.
Now system picks up the camera background as soon as the app starts. Originally users would see the app startup with the default theme and its dark background. The camera background would only appear after the inflation of the content view and the first layout/drawing pass. Change-Id: I9003b37b1a958c78f5fd804de9fedeb23bd90fc9
-rw-r--r--AndroidManifest.xml4
-rw-r--r--res/layout/camera.xml1
-rw-r--r--res/layout/video_camera.xml1
-rw-r--r--res/values/styles.xml3
4 files changed, 5 insertions, 4 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 9cdd7794..14bf99e3 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -27,7 +27,7 @@
</receiver>
<activity android:name="com.android.camera.Camera"
android:configChanges="orientation|keyboardHidden"
- android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
+ android:theme="@style/ThemeCamera"
android:screenOrientation="landscape"
android:clearTaskOnLaunch="true"
android:taskAffinity="android.task.camera">
@@ -49,7 +49,7 @@
android:label="@string/video_camera_label"
android:configChanges="orientation|keyboardHidden"
android:icon="@drawable/ic_launcher_video_camera"
- android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
+ android:theme="@style/ThemeCamera"
android:screenOrientation="landscape"
android:clearTaskOnLaunch="true"
android:taskAffinity="android.task.camcorder">
diff --git a/res/layout/camera.xml b/res/layout/camera.xml
index 772106bf..182084a5 100644
--- a/res/layout/camera.xml
+++ b/res/layout/camera.xml
@@ -16,7 +16,6 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"
- android:background="@drawable/camera_background"
android:id="@+id/camera"
android:orientation="horizontal"
android:layout_width="match_parent"
diff --git a/res/layout/video_camera.xml b/res/layout/video_camera.xml
index 82d1dc90..1dae598d 100644
--- a/res/layout/video_camera.xml
+++ b/res/layout/video_camera.xml
@@ -17,7 +17,6 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"
android:id="@+id/video_camera"
- android:background="@drawable/camera_background"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 613ac349..6de4a965 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -18,6 +18,9 @@
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="ThemeCamera" parent="android:Theme.Black.NoTitleBar.Fullscreen">
+ <item name="android:windowBackground">@drawable/camera_background</item>
+ </style>
<style name="OnScreenHintTextAppearance">
<item name="android:textColor">@android:color/primary_text_dark</item>
<item name="android:textColorHighlight">#FFFF9200</item>