summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2016-04-12 15:40:00 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-25 21:55:20 -0700
commit98ed4bd0c2d895fa4ef7d531200b876b3f04e61c (patch)
tree7a4b336e8301e82b499651a69e9623eb32fdfdeb
parentc3285b9fa1d4d4ff68ed1a00e017163d8beb9286 (diff)
downloadandroid_packages_apps_Snap-98ed4bd0c2d895fa4ef7d531200b876b3f04e61c.tar.gz
android_packages_apps_Snap-98ed4bd0c2d895fa4ef7d531200b876b3f04e61c.tar.bz2
android_packages_apps_Snap-98ed4bd0c2d895fa4ef7d531200b876b3f04e61c.zip
SnapdragonCamera: Replace SurfaceView with AutoFitSurfaceView
Replace SurfaceView with AutoFitSurfaceView Change-Id: Id4bf27e3b16f12ff4cfdce47224ff871b3981838 CRs-Fixed: 989750
-rw-r--r--res/layout/capture_module.xml4
-rw-r--r--src/com/android/camera/ui/AutoFitSurfaceView.java14
2 files changed, 9 insertions, 9 deletions
diff --git a/res/layout/capture_module.xml b/res/layout/capture_module.xml
index 02c32acab..a68af5e08 100644
--- a/res/layout/capture_module.xml
+++ b/res/layout/capture_module.xml
@@ -33,12 +33,12 @@
android:layout_height="match_parent"
android:layout_gravity="center_vertical|center_horizontal">
- <SurfaceView
+ <com.android.camera.ui.AutoFitSurfaceView
android:id="@+id/mdp_preview_content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
- <SurfaceView
+ <com.android.camera.ui.AutoFitSurfaceView
android:id="@+id/mdp_preview_content2"
android:layout_width="300dp"
android:layout_height="300dp" />
diff --git a/src/com/android/camera/ui/AutoFitSurfaceView.java b/src/com/android/camera/ui/AutoFitSurfaceView.java
index f4903e19f..38be39cf9 100644
--- a/src/com/android/camera/ui/AutoFitSurfaceView.java
+++ b/src/com/android/camera/ui/AutoFitSurfaceView.java
@@ -14,29 +14,29 @@
* limitations under the License.
*/
-package com.example.android.camera2basic;
+package com.android.camera.ui;
import android.content.Context;
import android.util.AttributeSet;
-import android.view.TextureView;
+import android.view.SurfaceView;
/**
- * A {@link TextureView} that can be adjusted to a specified aspect ratio.
+ * A {@link SurfaceView} that can be adjusted to a specified aspect ratio.
*/
-public class AutoFitTextureView extends TextureView {
+public class AutoFitSurfaceView extends SurfaceView {
private int mRatioWidth = 0;
private int mRatioHeight = 0;
- public AutoFitTextureView(Context context) {
+ public AutoFitSurfaceView(Context context) {
this(context, null);
}
- public AutoFitTextureView(Context context, AttributeSet attrs) {
+ public AutoFitSurfaceView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
- public AutoFitTextureView(Context context, AttributeSet attrs, int defStyle) {
+ public AutoFitSurfaceView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}