我提出包含三個選項卡Android應用程序..在第三個選項卡中有登錄屏幕..的ActivityGroup被棄用
當我點擊登錄按鈕...我想替換包含列表視圖與活動的活動和註銷按鈕....
以前我是用活動組更換activity..But活動組現在已經過時..
現在我怎能取代第三個選項卡下的活動?
我使用這些代碼
Intent intent = new Intent(MyApp.this, LoginPage.class);
replaceContentVieww("activity4", intent);
public void replaceContentVieww(String id, Intent newIntent) {
// TODO Auto-generated method stub
View view = getLocalActivityManager().startActivity(id,newIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView();
setContentView(view);
}
沒有從中我才知道這個class has been deprecated.
你是否得到了輸出..?我面臨同樣的問題 – GaneshKumar
你必須使用片段和片段管理器 –
你有任何參考或示例代碼或鏈接..? – GaneshKumar