How to add padding to a tabs label?

前端 未结 3 898
死守一世寂寞
死守一世寂寞 2020-12-20 04:30

I just started programming for android. I\'m using a tab based layout in my app. I would like to put some padding around the tab label so that it\'s not so close to the icon

3条回答
  •  既然无缘
    2020-12-20 04:51

    A simpler solution is :

     for (int i = 0; i < tabHost.getTabWidget().getChildCount(); i++) {
         tabHost.getTabWidget().getChildAt(i).setPadding(10,10,10,10); 
     }
    

提交回复
热议问题