mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-06-27 09:02:59 +02:00
implement capturing images
This commit is contained in:
@ -12,11 +12,13 @@ import android.widget.RelativeLayout;
|
||||
|
||||
import butterknife.Bind;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
@Bind(R.id.viewHolder) RelativeLayout viewHolder;
|
||||
|
||||
private static final String TAG = Preview.class.getSimpleName();
|
||||
private static final int REQUEST_IMAGE_CAPTURE = 1;
|
||||
private Preview preview;
|
||||
|
||||
@Override
|
||||
@ -33,6 +35,11 @@ public class MainActivity extends AppCompatActivity {
|
||||
viewHolder.addView(preview);
|
||||
}
|
||||
|
||||
@OnClick(R.id.shutter)
|
||||
public void takePicture() {
|
||||
preview.takePicture();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
Reference in New Issue
Block a user