summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2013-08-29 18:06:45 -0700
committerDoris Liu <tianliu@google.com>2013-08-29 18:06:45 -0700
commitbdd198ee9047fc180b8e97e1c3a76132256fd36c (patch)
tree12e98a708ca061cb762823f44d13307ff29c1342
parent8de13111cc4e62da3462ea321d18c7951282e0d0 (diff)
downloadandroid_packages_apps_Snap-bdd198ee9047fc180b8e97e1c3a76132256fd36c.tar.gz
android_packages_apps_Snap-bdd198ee9047fc180b8e97e1c3a76132256fd36c.tar.bz2
android_packages_apps_Snap-bdd198ee9047fc180b8e97e1c3a76132256fd36c.zip
Fix gap between camera controls and nav bar
Bug: 10097187 Change-Id: I9918a09a1e0b2d3c5a89330b800a9b7f2c2a6408
-rw-r--r--res/layout/photo_module.xml12
-rw-r--r--res/layout/video_module.xml12
-rw-r--r--src/com/android/camera/VideoUI.java2
3 files changed, 19 insertions, 7 deletions
diff --git a/res/layout/photo_module.xml b/res/layout/photo_module.xml
index f5525b832..b0bca3c97 100644
--- a/res/layout/photo_module.xml
+++ b/res/layout/photo_module.xml
@@ -24,10 +24,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
- <TextureView
- android:id="@+id/preview_content"
+ <!-- Wrap a frame layout around texture view so that when scaled, texture
+ view will not draw outside its unscaled bounds -->
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent">
+ <TextureView
+ android:id="@+id/preview_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+ </FrameLayout>
<View
android:id="@+id/flash_overlay"
android:layout_width="match_parent"
diff --git a/res/layout/video_module.xml b/res/layout/video_module.xml
index 0f4857965..b4444e7f0 100644
--- a/res/layout/video_module.xml
+++ b/res/layout/video_module.xml
@@ -17,10 +17,16 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent">
- <TextureView
- android:id="@+id/preview_content"
+ <!-- Wrap a frame layout around texture view so that when scaled, texture
+ view will not draw outside its unscaled bounds -->
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="match_parent" />
+ android:layout_height="match_parent">
+ <TextureView
+ android:id="@+id/preview_content"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+ </FrameLayout>
<View
android:id="@+id/flash_overlay"
android:layout_width="match_parent"
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 74d4cea9b..ad42b1aa0 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -168,7 +168,7 @@ public class VideoUI implements PieRenderer.PieListener,
mActivity.getLayoutInflater().inflate(R.layout.video_module, (ViewGroup) mRootView, true);
mTextureView = (TextureView) mRootView.findViewById(R.id.preview_content);
mTextureView.setSurfaceTextureListener(this);
- mRootView.addOnLayoutChangeListener(mLayoutListener);
+ mTextureView.addOnLayoutChangeListener(mLayoutListener);
((CameraRootView) mRootView).setDisplayChangeListener(this);
mFlashOverlay = mRootView.findViewById(R.id.flash_overlay);
mShutterButton = (ShutterButton) mRootView.findViewById(R.id.shutter_button);