I want know how can I change Bottom Navigation View's Icons when user basically selects it and then again replace it with previous icon if user selects different option.
Below is my switch case snippet.
switch (menuItem.getItemId()) {
case R.id.ic_home:
selectedFragment = new HomeFragment();
//menuItem.setIcon(R.drawable.like_colored);
break;
case R.id.ic_connect:
selectedFragment = new ConnectionFragment();
break;
case R.id.ic_add:
selectedFragment = new AddPostFragment();
break;
case R.id.ic_noti:
selectedFragment = new NotificationFragment();
break;
case R.id.ic_profile:
selectedFragment = new ProfileFragment();
break;