I used this library https://github.com/futuresimple/android-floating-action-button. How can I change the image of the main button? I want to change the button image right af
What I am using as follows,
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab_btn);
// State 1 -on
fab.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.fab_on));
// State 2 - off
fab.setImageDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.fab_off));
Hope this will help you