Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- btTirarFoto.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
- startActivityForResult(intent, 0);
- }
- });
- @Override
- public void onActivityResult(int requestCod, int resultCode, Intent data){
- if (data != null){
- Bundle bundle = data.getExtras();
- if (bundle != null){
- Bitmap img = (Bitmap) bundle.get("data");
- campoImg1.setVisibility(View.VISIBLE);
- campoImg1.setImageBitmap(img);
- }
- }
- }
Add Comment
Please, Sign In to add comment