diff --git a/cameraview/src/main/utils/com/otaliastudios/cameraview/CameraLogger.java b/cameraview/src/main/utils/com/otaliastudios/cameraview/CameraLogger.java index e724c502..e9a69d27 100644 --- a/cameraview/src/main/utils/com/otaliastudios/cameraview/CameraLogger.java +++ b/cameraview/src/main/utils/com/otaliastudios/cameraview/CameraLogger.java @@ -38,7 +38,7 @@ public final class CameraLogger { mTag = tag; } - public void i(String message) { + void i(String message) { if (should(LEVEL_VERBOSE)) { Log.i(mTag, message); lastMessage = message; @@ -46,7 +46,7 @@ public final class CameraLogger { } } - public void w(String message) { + void w(String message) { if (should(LEVEL_WARNING)) { Log.w(mTag, message); lastMessage = message; @@ -54,7 +54,7 @@ public final class CameraLogger { } } - public void e(String message) { + void e(String message) { if (should(LEVEL_ERROR)) { Log.w(mTag, message); lastMessage = message; @@ -77,15 +77,15 @@ public final class CameraLogger { return message.trim(); } - public void i(Object... data) { + void i(Object... data) { i(string(LEVEL_VERBOSE, data)); } - public void w(Object... data) { + void w(Object... data) { w(string(LEVEL_WARNING, data)); } - public void e(Object... data) { + void e(Object... data) { e(string(LEVEL_ERROR, data)); } } 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 b1b678a2..57411606 100644 --- a/demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java +++ b/demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.java @@ -132,6 +132,16 @@ public class CameraActivity extends AppCompatActivity implements View.OnClickLis } } + @Override + public void onBackPressed() { + BottomSheetBehavior b = BottomSheetBehavior.from(controlPanel); + if (b.getState() != BottomSheetBehavior.STATE_HIDDEN) { + b.setState(BottomSheetBehavior.STATE_HIDDEN); + return; + } + super.onBackPressed(); + } + private void edit() { BottomSheetBehavior b = BottomSheetBehavior.from(controlPanel); b.setState(BottomSheetBehavior.STATE_COLLAPSED);