Space-Navigation-View
Space-Navigation-View copied to clipboard
Changing centre background color ?
My problem is about to change centre button's background color. When i click centre button, i'm changing it's icon but background color is not changing. How can i do this ? Here is my code:
public void onCentreButtonClick(){ fragmentManager = getSupportFragmentManager(); if(isCentre){ //centre button is clicked or not. isCentre = false; bottom_nav.changeCenterButtonIcon(R.mipmap.p); //Open some fragment } else { isCentre = true; bottom_nav.changeCenterButtonIcon(R.mipmap.p_active); //Open centre fragment } final FragmentTransaction transaction = fragmentManager.beginTransaction(); transaction.replace(R.id.container, fragment).commit(); }
And here is my bottom_nav configurations:
bottom_nav.setCentreButtonIconColorFilterEnabled(false);
bottom_nav.setCentreButtonIcon(R.mipmap.p);
bottom_nav.setCentreButtonColor(ContextCompat.getColor(context, R.color.bottom_nav_back));
bottom_nav.setInActiveSpaceItemColor(ContextCompat.getColor(context, R.color.bottom_nav_items));
bottom_nav.setActiveSpaceItemColor(ContextCompat.getColor(context, R.color.bottom_nav_items));
bottom_nav.setSpaceBackgroundColor(ContextCompat.getColor(context, R.color.bottom_nav_back));
i have some proble like this, anyone can help us?
me to T-T