Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.content_mycamera_experiment);
- preview = (TextureView) findViewById(R.id.preview);
- click = (ImageButton) findViewById(R.id.click);
- createImgFolder();
- ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA,
- Manifest.permission.WRITE_EXTERNAL_STORAGE},REQUEST_WRITE_EXTERNAL_STORAGE_PERMISSION_RESULT );
- click.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- AsyncTask.execute(new Runnable() {
- @Override
- public void run() {
- onTakePhotoButtonClicked();
- }
- });
- }
- });
- }
Add Comment
Please, Sign In to add comment