I have some strange effects in my Android App.
I use a TabHoster with TabGroupActivities for each Tab. Works pretty good except the behaviour of the Back Button.
An Activity is launched and responds to the Back button. Then I start a Child Activity with a ViewSwitcher. When i hit the Back Button on View A Activity is dismissed as Expected. But it gets through the onBackPressed()
of my Activity.
When i hit the Back Button on View B (detailView==true) the Method is not even Called. Instead of that the onBackPressed()
of the TabGroupActivity is Called and I am not able to switch back to the first View.
@Override
public void onBackPressed() {
if (detailView == true){
vf.showPrevious();
detailView = false;
}
else {
super.onBackPressed();
}
return;
}
Can Anybody explain this and/or tell me how to switch between Views in an Activity in an ActivityGroup?