I have Imagebutton or image view in Main.xml
How can i assign result URI to ImageView or ImageButton?
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == Activity.RESULT_OK && requestCode == 0) {
String result = data.toURI();
}
}
public void onClick(DialogInterface arg0, int arg1) {
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
startActi开发者_如何学GovityForResult(intent, 0);
}
It's simple
mPhotoView.setImageURI(uri);
精彩评论