0
我在Main.xml中有Imagebutton或圖像視圖如何將圖像Capture的結果URI分配給ImageView或ImageButton?
如何將結果URI分配給ImageView或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");
startActivityForResult(intent, 0);
}