ActivityGroupは常にメインアクティビティになります。したがって、ActivityGroupのonCreateで、タブを作成できます(http://developer.android.com/guide/topics/ui/actionbar.html#Tabsを参照)。必ずActionBar.TabListenerをタブに追加してください。次に、onTabSelectedに、アクティビティを切り替えるためのコードを配置できます。
例えば:
public void onTabSelected(Tab tab, FragmentTransaction ft)
{
// assumed the tabs are created with a tag and that you defined the
// tablistener inline, so you have access to the ActivityGroup
Window window = MyActivityGroup.this.getLocalActivityManager().startActivity(tab.getTag(), intent);
final View view = window.getDecorView();
runOnUiThread(new Runnable()
{
public void run()
{
setContentView(view);
}
});
}
これがActionBarのタブに役立つことを願っています。ユーザーにアクティブなアクティビティを表示するために、もちろんタブがあります。それ以外の場合は、Activity.getParent()。setTitle( "child Activity")のように、子ActivityでgetParent()を使用してActivityGroupのタイトルを設定することもできます。または、子アクティビティで何かを実行して、タイトルのようなものを表示することもできます。