I have a TabLayout
in which I create the tabs programmatically in this method:
mTabLayout.removeAllTabs();
for(int i = 0; i < list(); i++) {
mTabLayout.addTab(mTabLayout.newTab().setText(list(i).name), false);
}
TabLayout.Tab newPlanTab = mTabLayout.newTab().setText(R.string.new_plan_tab);
mTabLayout.addTab(newPlanTab, false);
On this last tab I add, I want to set a background and different text color to highlight it, but I am not able to access these properties. How can I do this?
EDIT
A solution I found was to use a CustomView
, but I'm not sure how to customize this CustomView
to be the same as the other only with the different BG, should it inherit from whom?