Small changes

pull/62/head
Mattia Iavarone 7 years ago
parent 129179ed48
commit b9f0f27d8d
  1. 12
      cameraview/src/main/utils/com/otaliastudios/cameraview/CameraLogger.java
  2. 10
      demo/src/main/java/com/otaliastudios/cameraview/demo/CameraActivity.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));
}
}

@ -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);

Loading…
Cancel
Save