protected void updateTab(TabLayout.Tab tab) { onUpdateTab(tab); }
@Override protected void onUpdateTab(TabLayout.Tab tab) { super.onUpdateTab(tab); int position = tab.getPosition(); View v = tab.getCustomView(); TextView tv = (TextView) v.findViewById(R.id.text); tv.setTextColor(Color.WHITE); tv.setText(tab.getText()); v.setBackgroundColor(getTabColor(position)); }