2
我想在FragmentTabHost與片段溝通的FragmentTabHost
片段 - >活動完成通信與片段溝通!帶有一個接口。
但我不能創造一個溝通活動 - >碎片,因爲我創造了這樣的片段:
mTabHost.addTab(
mTabHost.newTabSpec("tab2").setIndicator("Affichage",
getResources().getDrawable(android.R.drawable.star_on)),
MySelectionFragment.class, null);
MySelectionFragment是一類不喜歡new MySelectionFragment()
一個片段,我不知道如何溝通帶班:/
在此先感謝!
我不能找到在['TabHost']的任何方法(http://developer.android.com/reference/android/widget /TabHost.html)作爲'addTab(TabSpec,Class,????)'。你說你用了什麼方法? – gunar
我也沒有。我在答案中發現它:http://stackoverflow.com/questions/17227855/tabhost-with-fragments-and-fragmentactivity – nsvir
...你實際上使用了'FragmentTabHost'。當您發佈問題時請詳細說明。不要把人引向另一個方向。 – gunar