Here is my layout inside ViewPager
. I would like to change the color of the current tab highlighter which is below the text. Actually it is showing in black color.
It can be done in both programmatically with jAVA or with XML
By XML
Or more simply you can solve this Code aswell
tabLayout.setSelectedTabIndicatorColor(Color.parseColor("#FFFFFF"));
Similarly to change the Height
tabLayout.setSelectedTabIndicatorHeight((int) (2 * getResources().getDisplayMetrics().density));