|
|
@ -5,7 +5,6 @@ import android.graphics.Bitmap; |
|
|
|
import android.graphics.BitmapFactory; |
|
|
|
import android.graphics.BitmapFactory; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.support.v7.app.AppCompatActivity; |
|
|
|
import android.support.v7.app.AppCompatActivity; |
|
|
|
import android.view.MotionEvent; |
|
|
|
|
|
|
|
import android.view.View; |
|
|
|
import android.view.View; |
|
|
|
import android.view.ViewGroup; |
|
|
|
import android.view.ViewGroup; |
|
|
|
import android.view.ViewTreeObserver; |
|
|
|
import android.view.ViewTreeObserver; |
|
|
@ -24,7 +23,6 @@ import java.io.File; |
|
|
|
import butterknife.BindView; |
|
|
|
import butterknife.BindView; |
|
|
|
import butterknife.ButterKnife; |
|
|
|
import butterknife.ButterKnife; |
|
|
|
import butterknife.OnClick; |
|
|
|
import butterknife.OnClick; |
|
|
|
import butterknife.OnTouch; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class MainActivity extends AppCompatActivity implements View.OnLayoutChangeListener { |
|
|
|
public class MainActivity extends AppCompatActivity implements View.OnLayoutChangeListener { |
|
|
|
|
|
|
|
|
|
|
@ -34,9 +32,6 @@ public class MainActivity extends AppCompatActivity implements View.OnLayoutChan |
|
|
|
@BindView(R.id.camera) |
|
|
|
@BindView(R.id.camera) |
|
|
|
CameraView camera; |
|
|
|
CameraView camera; |
|
|
|
|
|
|
|
|
|
|
|
@BindView(R.id.focusMarker) |
|
|
|
|
|
|
|
FocusMarkerLayout focusMarker; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Capture Mode:
|
|
|
|
// Capture Mode:
|
|
|
|
|
|
|
|
|
|
|
|
@BindView(R.id.captureModeRadioGroup) |
|
|
|
@BindView(R.id.captureModeRadioGroup) |
|
|
@ -313,10 +308,4 @@ public class MainActivity extends AppCompatActivity implements View.OnLayoutChan |
|
|
|
camera.removeOnLayoutChangeListener(this); |
|
|
|
camera.removeOnLayoutChangeListener(this); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@OnTouch(R.id.focusMarker) |
|
|
|
|
|
|
|
boolean onTouchCamera(View view, MotionEvent motionEvent) { |
|
|
|
|
|
|
|
focusMarker.focus(motionEvent.getX(), motionEvent.getY()); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|