实现代码如下:
@Override
public void onBackPressed() {
// TODO Auto-generated method stub
Intent backIntent = new Intent(Activity3.this, Activity1.class);
Bundle bundle = new Bundle();
if(!clickOk)
bundle.putString("send", "ERROR");
backIntent.putExtras(bundle);
Activity3.this.setResult(1, backIntent);
Activity3.this.finish();
//super.onBackPressed();
}
以上就是【Android开发笔记之:返回键的复写onBackPressed()介绍】的全部内容了,欢迎留言评论进行交流!