I am using ActivityGroup
in my application, structure is as follow
A > B > C (where A display first), and B and C makes a loop, like B > C > B > C > B
and at both B and C if a user press back button, activity A should be display(even if user is on C), and there no need of B and C in stack.
So how can I implement onBackPressed()
or any other method to make my application.
If I would go into such situation then here is what I opt
for over riding back key in B and C activity here is code
@Override
public boolean onKeyDown(int keyCode, KeyEvent event)
{
if ((keyCode == KeyEvent.KEYCODE_BACK))
{
finish();
}
return super.onKeyDown(keyCode, event);
}