In my android application, I have following requirement.
Activity A --> Activity B(Go to A Option) --> Activity C(Go To A Option,Go To B Option)
<
You can do this as:
On back press option:
onBackPressed(){ @Override public void onBackPressed() {
// TODO Auto-generated method stub
super.onBackPressed();
//Your method intent
Intent intent = new Intent(A.this, C.class);
startActivity(intent);
}
Using a button:
button.setOnClickListener( new View.OnClickListener() {
public void onClick(View v)
{
Intent intent = new Intent(A.this, C.class);
startActivity(intent);
// finish(); // may use finish if do not want endless loop
}});