問題描述:在界面跳轉時,如果按手機物理鍵返回,出現無限跳轉的現象
1、帶值跳轉(注意傳值)
Intent intent=new Intent();
//去除無限跳轉問題
public void onBackPressed() {
// TODO Auto-generated method stub
Intent i=new Intent();
i.putExtra("name", ""+nick);
setResult(900, i);
super.onBackPressed();
}
2、不帶帶值跳轉
public void onBackPressed() {
// TODO Auto-generated method stub
super.onBackPressed();
}