0
Hello
I’m using the class Slidingtablayout normally.
But I would like you to change the color when selecting the item or Fragment
The slidingTabLayout settings I’m making are those on onCreate
:
Mainactivity.class
slidingTabLayout.setCustomTabView( R.layout.tab_view, R.id.text_item_tab );
slidingTabLayout.setDistributeEvenly( true );
slidingTabLayout.setSelectedIndicatorColors(ContextCompat.getColor( this, R.color.colorTabIndicator ));
slidingTabLayout.setViewPager( viewPager );
Slidingtablayout.class
Within the method populateTabStrip
added a few lines and nothing:
private void populateTabStrip() {
/* resto do código */
int color = ContextCompat.getColor( tabView.getContext(), R.color.colorTabIndicator );
tabTitleView.setTextColor( color );
}
You will have to create a list of the 2 types of icons, list_normalicons, and list_selectedicons, when the transition occurs, your imageview will have to change the icon
– Dev
I decided using an easier one. The Tablayout.
– adventistaam
It’s a good option =)
– Dev