From 6e6714dec47183c6d79a867b7c4eda642211e9e3 Mon Sep 17 00:00:00 2001 From: Mattia Iavarone Date: Wed, 30 May 2018 13:56:57 +0200 Subject: [PATCH] Temp commit --- .../cameraview/demo/CameraActivity.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java b/demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java index 15e9b614..025c1253 100644 --- a/demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java +++ b/demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java @@ -35,7 +35,8 @@ public class CameraActivity extends AppCompatActivity implements View.OnClickLis @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - getWindow().setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, + getWindow().setFlags( + WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED, WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED); setContentView(R.layout.activity_camera); CameraLogger.setLogLevel(CameraLogger.LEVEL_VERBOSE); @@ -45,12 +46,7 @@ public class CameraActivity extends AppCompatActivity implements View.OnClickLis camera.addCameraListener(new CameraListener() { public void onCameraOpened(CameraOptions options) { onOpened(); } public void onPictureTaken(PictureResult result) { onPicture(result); } - - @Override - public void onVideoTaken(VideoResult result) { - super.onVideoTaken(result); - onVideo(result.getFile()); - } + public void onVideoTaken(VideoResult result) { onVideo(result.getFile()); } }); findViewById(R.id.edit).setOnClickListener(this); @@ -64,7 +60,8 @@ public class CameraActivity extends AppCompatActivity implements View.OnClickLis Control[] controls = Control.values(); for (Control control : controls) { ControlView view = new ControlView(this, control, this); - group.addView(view, ViewGroup.LayoutParams.MATCH_PARENT, + group.addView(view, + ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); }