FragmentTabHost with drawable icon

后端 未结 1 1137
小蘑菇
小蘑菇 2020-12-22 02:34

I have implemented tabs using FragmentTabHost in support package, but the drawable icon is not shown?

How to show the drawable icon with FragmentTabHost?

<         


        
相关标签:
1条回答
  • 2020-12-22 02:34

    I had the same problem. Apparently, setIndicator(label, icon) does not work correctly. As a workaround, I used setIndicator(view) and created a simple custom view in tab_indicator.xml. For each tab, set the title and icon.

    0 讨论(0)
提交回复
热议问题