summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout-xlarge/attach_camera_control.xml91
-rw-r--r--res/layout-xlarge/camera_attach.xml26
-rw-r--r--res/layout-xlarge/camera_control.xml11
-rw-r--r--res/layout-xlarge/review_control.xml64
-rw-r--r--res/layout-xlarge/review_thumbnail.xml1
-rw-r--r--res/layout/attach_camera_control.xml1
-rw-r--r--src/com/android/camera/Camera.java21
-rw-r--r--src/com/android/camera/VideoCamera.java2
8 files changed, 116 insertions, 101 deletions
diff --git a/res/layout-xlarge/attach_camera_control.xml b/res/layout-xlarge/attach_camera_control.xml
deleted file mode 100644
index c84e7a6..0000000
--- a/res/layout-xlarge/attach_camera_control.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"
- android:id="@+id/control_bar"
- android:layout_height="match_parent"
- android:layout_width="120dp"
- android:layout_marginTop="20dp"
- android:layout_marginBottom="20dp"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp">
- <TextView android:id="@+id/recording_time"
- style="@style/RecordingTime"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_marginTop="90dp"
- android:drawablePadding="8dp"
- android:drawableLeft="@drawable/ic_recording_indicator"
- android:visibility="gone" />
-
- <LinearLayout android:orientation="vertical"
- android:gravity="top|center_horizontal"
- android:layout_alignParentTop="true"
- android:layout_centerHorizontal="true"
- android:layout_height="wrap_content"
- android:layout_width="match_parent">
- <LinearLayout style="@style/ReviewControlGroup"
- android:layout_marginBottom="15dp">
- <ImageView style="@style/ReviewControlIcon"
- android:id="@+id/btn_cancel"
- android:src="@drawable/btn_ic_review_cancel"/>
- <TextView style="@style/ReviewControlText"
- android:text="@string/review_cancel" />
- </LinearLayout>
- <LinearLayout style="@style/ReviewControlGroup"
- android:visibility="gone"
- android:layout_marginBottom="15dp">
- <ImageView style="@style/ReviewControlIcon"
- android:id="@+id/btn_retake"
- android:src="@drawable/btn_ic_review_retake_photo"/>
- <TextView style="@style/ReviewControlText"
- android:text="@string/review_retake" />
- </LinearLayout>
- <LinearLayout style="@style/ReviewControlGroup"
- android:visibility="gone"
- android:layout_marginBottom="15dp">
- <ImageView style="@style/ReviewControlIcon"
- android:id="@+id/btn_play"
- android:src="@drawable/btn_ic_review_play"/>
- <TextView style="@style/ReviewControlText"
- android:text="@string/review_play" />
- </LinearLayout>
- </LinearLayout>
-
- <com.android.camera.ShutterButton android:id="@+id/shutter_button"
- android:layout_centerInParent="true"
- android:layout_centerHorizontal="true"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:scaleType="center"
- android:clickable="true"
- android:focusable="true"
- android:src="@drawable/btn_ic_camera_shutter"
- android:background="@drawable/btn_shutter"/>
- <LinearLayout style="@style/ReviewControlGroup"
- android:visibility="invisible"
- android:layout_alignParentBottom="true"
- android:layout_centerHorizontal="true">
- <ImageView style="@style/ReviewControlIcon"
- android:id="@+id/btn_done"
- android:src="@drawable/btn_ic_review_done"/>
- <TextView style="@style/ReviewControlText"
- android:text="@string/review_ok" />
- </LinearLayout>
-</RelativeLayout>
diff --git a/res/layout-xlarge/camera_attach.xml b/res/layout-xlarge/camera_attach.xml
new file mode 100644
index 0000000..796a033
--- /dev/null
+++ b/res/layout-xlarge/camera_attach.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"
+ android:id="@+id/app_root"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <include layout="@layout/camera_control"/>
+ <include layout="@layout/preview_frame"/>
+</RelativeLayout>
diff --git a/res/layout-xlarge/camera_control.xml b/res/layout-xlarge/camera_control.xml
index 148b30e..8b712a6 100644
--- a/res/layout-xlarge/camera_control.xml
+++ b/res/layout-xlarge/camera_control.xml
@@ -19,9 +19,7 @@
android:id="@+id/control_panel"
android:layout_height="match_parent"
android:layout_width="300dp"
- android:layout_alignParentRight="true"
- android:layout_marginTop="40dp"
- android:layout_marginBottom="40dp">
+ android:layout_alignParentRight="true">
<!-- The width is determined by IndicatorWheel so we should set
layout_width as wrap_contant but RelativeLayout Javadoc says that
this is circular dependency and is not allowed so it's very
@@ -34,14 +32,16 @@
android:layout_alignParentRight="true"
android:layout_width="45dp"
android:layout_height="150dp"
+ android:layout_marginTop="40dp"
android:layout_marginRight="160dp"/>
<TextView android:id="@+id/time_lapse_recording_time"
style="@style/RecordingTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_below="@id/recording_time"
+ android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
+ android:layout_marginTop="40dp"
android:visibility="gone" />
<com.android.camera.ui.IndicatorWheel android:id="@+id/indicator_wheel"
@@ -60,6 +60,7 @@
</com.android.camera.ui.IndicatorWheel>
<com.android.camera.SwitcherSet android:id="@+id/camera_switch"
+ android:visibility="invisible"
android:orientation="vertical"
android:gravity="center"
android:layout_height="150dp"
@@ -67,6 +68,7 @@
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="160dp"
+ android:layout_marginBottom="40dp"
android:background="@drawable/mode_switch_bg_v2">
<RadioButton android:id="@+id/switch_off_button"
android:layout_height="wrap_content"
@@ -86,5 +88,6 @@
android:button="@android:color/transparent"
android:background="@drawable/btn_ic_mode_switch_camera"/>
</com.android.camera.SwitcherSet>
+ <include layout="@layout/review_control"/>
</com.android.camera.ui.ControlPanel>
diff --git a/res/layout-xlarge/review_control.xml b/res/layout-xlarge/review_control.xml
new file mode 100644
index 0000000..c0841a4
--- /dev/null
+++ b/res/layout-xlarge/review_control.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/review_control"
+ android:visibility="gone"
+ android:orientation="vertical"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:gravity="top|center_horizontal"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentRight="true"
+ android:layout_marginBottom="10dp"
+ android:layout_marginRight="150dp">
+ <LinearLayout style="@style/ReviewControlGroup"
+ android:visibility="gone"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true">
+ <ImageView style="@style/ReviewControlIcon"
+ android:id="@+id/btn_done"
+ android:src="@drawable/btn_ic_review_done"/>
+ <TextView style="@style/ReviewControlText"
+ android:text="@string/review_ok" />
+ </LinearLayout>
+ <LinearLayout style="@style/ReviewControlGroup"
+ android:visibility="gone"
+ android:layout_marginBottom="15dp">
+ <ImageView style="@style/ReviewControlIcon"
+ android:id="@+id/btn_retake"
+ android:src="@drawable/btn_ic_review_retake_photo"/>
+ <TextView style="@style/ReviewControlText"
+ android:text="@string/review_retake" />
+ </LinearLayout>
+ <LinearLayout style="@style/ReviewControlGroup"
+ android:visibility="gone"
+ android:layout_marginBottom="15dp">
+ <ImageView style="@style/ReviewControlIcon"
+ android:id="@+id/btn_play"
+ android:src="@drawable/btn_ic_review_play"/>
+ <TextView style="@style/ReviewControlText"
+ android:text="@string/review_play" />
+ </LinearLayout>
+ <LinearLayout style="@style/ReviewControlGroup"
+ android:layout_marginBottom="15dp">
+ <ImageView style="@style/ReviewControlIcon"
+ android:id="@+id/btn_cancel"
+ android:src="@drawable/btn_ic_review_cancel"/>
+ <TextView style="@style/ReviewControlText"
+ android:text="@string/review_cancel" />
+ </LinearLayout>
+</LinearLayout>
diff --git a/res/layout-xlarge/review_thumbnail.xml b/res/layout-xlarge/review_thumbnail.xml
index 708c38e..2031450 100644
--- a/res/layout-xlarge/review_thumbnail.xml
+++ b/res/layout-xlarge/review_thumbnail.xml
@@ -15,6 +15,7 @@
-->
<com.android.camera.RotateImageView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:visibility="invisible"
android:id="@+id/review_thumbnail"
android:layout_width="112dp"
android:layout_height="112dp"
diff --git a/res/layout/attach_camera_control.xml b/res/layout/attach_camera_control.xml
index 7653723..fdb48b8 100644
--- a/res/layout/attach_camera_control.xml
+++ b/res/layout/attach_camera_control.xml
@@ -23,6 +23,7 @@
android:layout_marginBottom="10dp"
android:layout_alignParentRight="true">
<LinearLayout android:orientation="vertical"
+ android:id="@+id/review_control"
android:gravity="top|center_horizontal"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 3d7c3f5..9e4700c 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -161,6 +161,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
private GestureDetector mPopupGestureDetector;
private SwitcherSet mSwitcher;
private boolean mStartPreviewFail = false;
+ private View mIndicatorWheel;
private GLRootView mGLRootView;
@@ -381,6 +382,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
mThumbnailButton =
(RotateImageView) findViewById(R.id.review_thumbnail);
if (mThumbnailButton != null) {
+ mThumbnailButton.setVisibility(View.VISIBLE);
mThumbnailButton.setOnClickListener(this);
mThumbnailButton.loadData(ImageManager.getLastImageThumbPath());
updateThumbnailButton();
@@ -1006,14 +1008,17 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
if (mIsImageCaptureIntent) {
setupCaptureParams();
- View controlBar = findViewById(R.id.control_bar);
- controlBar.findViewById(R.id.btn_cancel).setOnClickListener(this);
- controlBar.findViewById(R.id.btn_retake).setOnClickListener(this);
- controlBar.findViewById(R.id.btn_done).setOnClickListener(this);
+ View reviewControl = findViewById(R.id.review_control);
+ reviewControl.setVisibility(View.VISIBLE);
+ reviewControl.findViewById(R.id.btn_cancel).setOnClickListener(this);
+ reviewControl.findViewById(R.id.btn_retake).setOnClickListener(this);
+ reviewControl.findViewById(R.id.btn_done).setOnClickListener(this);
} else {
mSwitcher = (SwitcherSet) findViewById(R.id.camera_switch);
+ mSwitcher.setVisibility(View.VISIBLE);
mSwitcher.setOnSwitchListener(this);
}
+ mIndicatorWheel = findViewById(R.id.indicator_wheel);
// Show zoom picker.
ViewStub zoomStub = (ViewStub) findViewById(R.id.zoom_stub);
@@ -2109,7 +2114,9 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
private void showPostCaptureAlert() {
if (mIsImageCaptureIntent) {
- findViewById(R.id.shutter_button).setVisibility(View.INVISIBLE);
+ if (mIndicatorWheel == null) {
+ mShutterButton.setVisibility(View.INVISIBLE);
+ }
int[] pickIds = {R.id.btn_retake, R.id.btn_done};
for (int id : pickIds) {
View button = findViewById(id);
@@ -2120,7 +2127,9 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
private void hidePostCaptureAlert() {
if (mIsImageCaptureIntent) {
- findViewById(R.id.shutter_button).setVisibility(View.VISIBLE);
+ if (mIndicatorWheel == null) {
+ mShutterButton.setVisibility(View.VISIBLE);
+ }
int[] pickIds = {R.id.btn_retake, R.id.btn_done};
for (int id : pickIds) {
View button = findViewById(id);
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index a6680be..952c455 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -360,6 +360,7 @@ public class VideoCamera extends NoSearchActivity
initThumbnailButton();
mSwitcher = (SwitcherSet) findViewById(R.id.camera_switch);
+ mSwitcher.setVisibility(View.VISIBLE);
mSwitcher.setOnSwitchListener(this);
}
@@ -1566,6 +1567,7 @@ public class VideoCamera extends NoSearchActivity
private void initThumbnailButton() {
mThumbnailButton = (RotateImageView)findViewById(R.id.review_thumbnail);
if (mThumbnailButton != null) {
+ mThumbnailButton.setVisibility(View.VISIBLE);
mThumbnailButton.setOnClickListener(this);
mThumbnailButton.loadData(ImageManager.getLastVideoThumbPath());
}