In AActivity, when button1 is press, then call BActivity.
Button b1= (Button)findViewById(R.id.button1);
b1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent();
intent.setClass(AActivity.this, BActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}
});
In BActivity, I want that when button2 is press, then recall AActivity.
Button b2= (Button)findViewById(R.id.button2);
b2.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//How to do?
}
});
I want back without press "back" button on keyboard. And replace with button in layout. How should I do?
When call back to AActivity, is it possible to run the onCreate() method?