public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(resultCode == GALLERY){
if (data != null) {
Bitmap photo = (Bitmap) data.getExtras().get("data");
imageView.setImageBitmap(photo);
}
}
答案 0 :(得分:0)
声明布尔值并设置为true
public boolean Counter = true;
public void setImage()
{
while (Counter)
continue;
imageView.setImageBitmap(photo);
}
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(resultCode == GALLERY){
if (data != null) {
Bitmap photo = (Bitmap) data.getExtras().get("data");
Counter = false;
}
}