0
,但現在它已過時,所以現在我們都推薦使用FragmentTabs,我發現this example上手:片段標籤我使用的標籤在我的應用程序圖像
// Tab titles
private String[] tabs = { "Top Rated", "Games", "Movies" };
但我的問題是如何能我使用圖片代替片段標籤中的文字?
,但現在它已過時,所以現在我們都推薦使用FragmentTabs,我發現this example上手:片段標籤我使用的標籤在我的應用程序圖像
// Tab titles
private String[] tabs = { "Top Rated", "Games", "Movies" };
但我的問題是如何能我使用圖片代替片段標籤中的文字?
使用操作SetIcon(R.drawable.icon)以顯示在位文字的片段標籤圖標,
看到這個example
像:
// Create Tab1 with a custom image in res folder
mTabHost.addTab(mTabHost.newTabSpec("tab1").setIndicator("", getResources().getDrawable(R.drawable.tab1)),
FragmentTab1.class, null);
你嘗試我的解決方案? –