Code regions

pull/8/head
Mattia Iavarone 8 years ago
parent 542646ee93
commit 7d53907ad4
  1. 33
      cameraview/src/main/java/com/otaliastudios/cameraview/CameraView.java

@ -94,6 +94,8 @@ public class CameraView extends FrameLayout {
init(context, attrs); init(context, attrs);
} }
//region Init
@SuppressWarnings("WrongConstant") @SuppressWarnings("WrongConstant")
private void init(@NonNull Context context, @Nullable AttributeSet attrs) { private void init(@NonNull Context context, @Nullable AttributeSet attrs) {
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.CameraView, 0, 0); TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.CameraView, 0, 0);
@ -200,10 +202,9 @@ public class CameraView extends FrameLayout {
super.onDetachedFromWindow(); super.onDetachedFromWindow();
} }
//endregion
// Smart measuring behavior //region Measuring behavior
// ------------------------
private String ms(int mode) { private String ms(int mode) {
switch (mode) { switch (mode) {
@ -340,10 +341,9 @@ public class CameraView extends FrameLayout {
MeasureSpec.makeMeasureSpec(height, EXACTLY)); MeasureSpec.makeMeasureSpec(height, EXACTLY));
} }
//endregion
// Gesture APIs and touch control //region Gesture APIs
// ------------------------------
/** /**
* Maps a {@link Gesture} to a certain gesture action. * Maps a {@link Gesture} to a certain gesture action.
@ -468,10 +468,9 @@ public class CameraView extends FrameLayout {
return false; return false;
} }
//endregion
// Lifecycle APIs //region Lifecycle APIs
// --------------
/** /**
* Returns whether the camera has started showing its preview. * Returns whether the camera has started showing its preview.
@ -586,10 +585,9 @@ public class CameraView extends FrameLayout {
mWorkerHandler = null; mWorkerHandler = null;
} }
//endregion
// Public APIs for parameters and controls //region Public APIs for controls
// ---------------------------------------
/** /**
* Returns a {@link CameraOptions} instance holding supported options for this camera * Returns a {@link CameraOptions} instance holding supported options for this camera
@ -1158,10 +1156,9 @@ public class CameraView extends FrameLayout {
} }
} }
//endregion
// Callbacks and dispatch //region Callbacks and dispatching
// ----------------------
private MediaActionSound mSound; private MediaActionSound mSound;
private final boolean mUseSounds = Build.VERSION.SDK_INT >= 16; private final boolean mUseSounds = Build.VERSION.SDK_INT >= 16;
@ -1394,10 +1391,9 @@ public class CameraView extends FrameLayout {
} }
} }
//endregion
// Deprecated stuff //region Deprecated
// ----------------
/** /**
* This does nothing. * This does nothing.
@ -1459,4 +1455,5 @@ public class CameraView extends FrameLayout {
return 0; return 0;
} }
//endregion
} }

Loading…
Cancel
Save