一、找到对应的控件 tabLayout = (TabLayout) view.findViewById(R.id.tab_layout); tabLayout.post(new Runnable() {@Override public void run() { setIndicator(tabLayout,60,60); } }); 二、实现setIndicator方法
TabLayout控件字体居中
最新推荐文章于 2024-03-06 13:04:10 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
一、找到对应的控件 tabLayout = (TabLayout) view.findViewById(R.id.tab_layout); tabLayout.post(new Runnable() {@Override public void run() { setIndicator(tabLayout,60,60); } }); 二、实现setIndicator方法