用相机拍照后,我试图更改 Button 属性。
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != RESULT_OK) return;
Bitmap bitmap = utilities.decodeFile(path, 300);
imgPicHolder.setImageBitmap(bitmap);
//The pic is changing on the previous Activity, this works fine
Button button = (Button)findViewById(R.id.btnChange);
button.setText("NewText");
//Here is the problem, when trying to change the button property from the previous activity before taking the picture..
}