I have two similar question,
1.
I have a TabActivity, and when I select one specific tab I want to display one of two candidates activities. And it depends on run-time. i.e. I want to display two different activity in one tab dynamically due to different mode.
For more detail description,
It’s like a social platform, user may belong to a group or not.
If he belongs to a group, when he select “GroupTab”, he can see a activity page for group info.
If he does not belong to any group, when he select “GroupTab”, he can see a list of all available groups.
He can join or quit a group dynamically, so the GroupTab’s content is depend on run-time.
2.
When I press a button in a activity (which is in a Tab), I want to change to next activity, and that activity could go backward to original activity too. (All activities should be under the Tab)
—
I’ve seen some method using ActivityGroup, and since it is deprecated, I’m looking for some other alternative way to implement that.
Any solution?
EDIT: For your first question. I’m thiking that you can use the OnTabChangeListener and then check what tab is currently selected and based on that check if a user belongs to a group or not.
For question two, Fragment is the way to go. There’s a post on it here: http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html
EDIT: You will have to install the compatibility package to use Fragments in Android < 3.0