此代码不会转到以前的活动,当单击按钮时应该这样做:当前活动到另一个活动。如果我写完成();工作正常,但我的代码有什么问题?在我的第三个活动AgAppAskPinForTransaction
中,当我按下后退按钮时不会转到agappmenu.class
(上一个活动)。这段代码有什么问题?怎么去上一个活动?我不想使用“ finish();
”我只想关闭当前活动并在单击按钮时转到上一个活动?
public class LoginScreen extends Activity {
Intent i = new Intent(this.getApplicationContext(), AgAppMenu.class);
MyBean bean = new MyBean();
bean.set2DArray(xmlRespone);
Bundle b = new Bundle();
b.putSerializable("mybean", bean);
i.putExtra("obj", b);
startActivity(i);
public class AgAppMenu extends Activity {
Intent intent = new Intent(AgAppMenu.this,
AgAppAskPinForTransaction.class);
Bundle bundle = new Bundle();
bundle.putString("mno", "MIN");
intent.putExtras(bundle);
startActivity(intent);
}
public class AgAppAskPinForTransaction extends Activity{
btngoback.setOnClickListener(new OnClickListener()
{
public void onClick(View v)
{
Intent intent = new Intent(AgAppMenu.this,
AgAppAskPinForTransaction.class);
startActivity(intent);
}
});