When I set the drawable via setImageResourceActive() method, the initial drawable resource not shown for first time opened app. after select /unselect the drawable changing working. did i miss anything? can you help for this.
|Thanks.
final BottomNavigationView bottomNavigationView =(BottomNavigationView)findViewById(R.id.bottomNavigation);
BottomNavigationItem homeNavigationItem = new BottomNavigationItem
("Feed", ContextCompat.getColor(this, R.color.colorAccent), R.drawable.ic_home_icon);
BottomNavigationItem recentsNavigationItem = new BottomNavigationItem
("Recents", Color.parseColor("#553e52"), R.drawable.ic_wall_clock);
BottomNavigationItem vaskNavigationItem = new BottomNavigationItem
("Vask", Color.parseColor("#7B1FA2"), R.drawable.vask_icon);
final BottomNavigationItem favoritesNavigationItem = new BottomNavigationItem
("Favorites",Color.parseColor("#FF5252"), R.drawable.heart_shape);
favoritesNavigationItem.setImageResource(R.drawable.heart_shape);
favoritesNavigationItem.setImageResourceActive(R.drawable.vask_icon);
BottomNavigationItem profileNavigationItem = new BottomNavigationItem
("Profile", Color.parseColor("#FF9800"), R.drawable.ic_user_silhouette);
bottomNavigationView.addTab(homeNavigationItem);
bottomNavigationView.addTab(recentsNavigationItem);
bottomNavigationView.addTab(vaskNavigationItem);
bottomNavigationView.addTab(favoritesNavigationItem);
bottomNavigationView.addTab(profileNavigationItem);
Hi,
When I set the drawable via setImageResourceActive() method, the initial drawable resource not shown for first time opened app. after select /unselect the drawable changing working. did i miss anything? can you help for this.
|Thanks.