效果图:
使用方法:
可设置等分
ModifyTabLayout tabLayout=findViewById(R.id.modiftTabLayout);
ViewPager vp=findViewById(R.id.vp);
tabLayout.setViewHeight(dp2px(35));
tabLayout.setBottomLineWidth(dp2px(10));
tabLayout.setBottomLineHeight(dp2px(3));
tabLayout.setBottomLineHeightBgResId(R.color.color_14805E);
tabLayout.setItemInnerPaddingLeft(dp2px(6));
tabLayout.setItemInnerPaddingRight(dp2px(6));
tabLayout.setmTextColorSelect(ContextCompat.getColor(this,R.color.color_14805E));
tabLayout.setmTextColorUnSelect(ContextCompat.getColor(this,R.color.color_666666));
tabLayout.setTextSize(16);
// int width=getResources().ge