Solving this issue took me several days of investigation and research.
The structure of my app is the following:
Three tabs are set for this TabHost.
Each tab click opens proper ListView page.
OnClick action for ListView item opens proper Activity, which was done, by the following code:
Intent intent = new Intent(this, newActivity.class); this.startActivity(intent);
The problem was, that newActivity was opened in new Window, but I wanted to open it in the same window.
Asking for help on stackoverflow.com didn’t help.
And then suddenly I found the following solution Experience – Multiple Android Activities in a TabActivity
Now my code to run newActivity look as following:
TabGroupActivity parentActivity = (TabGroupActivity)getParent(); parentActivity.onBackPressed(); Intent newIntent = new Intent(getParent(), newActivity.class); parentActivity.startChildActivity("newActivity", newIntent);
Note: if you have any kind of Widget functionality, which pop-ups in your View, then make sure, that getParent() is used for Context.