我正在编写一个库,当用户执行某些操作时,该库将启动一系列活动。如果从不按下后退,则流程应为:
用户返回到ParentAppScreen1
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
// Respond to the action bar's Up/Home button
case android.R.id.home:
this.finish();
return true;
case R.id.action_send:
sendReport();
// TODO go back to where the user started in parent app
}
return super.onOptionsItemSelected(item);
}
对此有任何标准做法吗?浏览文档时找不到很多东西,也不确定从哪里开始。