TabLayout的app:app:tabBackground属性怎么用代码设置
要看看源码,是设置setBackgroundDrawable 属性
mTabBackgroundResId = a.getResourceId(R.styleable.TabLayout_tabBackground, 0);
if (mTabBackgroundResId != 0) {
setBackgroundDrawable(
AppCompatDrawableManager.get().getDrawable(context, mTabBackgroundResId));
}