ITeye博客

android startActivityForResult

staroflife · 2012-12-25 09:02 · android · 移动开发 · Markdown

Bashboard.java Intent i = new Intent(this, NewAccount.class); startActivityForResult(i, 0);

onActivityResult(......){ if(data!=null){ Bundle bundle=data.getExtras(); ......... } }

NewAccount.java Bundle bundle = new Bundle(); bundle.putString("returnStatus", action); Intent mIntent = new Intent(); mIntent.putExtras(bundle); setResult(RESULT_OK, mIntent); finish();

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。