Question Detail

How to set android:src Icon through programmatically?
I have tried 

fab.setImageResource(getResources().getDrawable(R.drawable.ic_save));


Thread Reply

Anonymous

- 1 years ago

there is an only small mistake you have done.
try this: 

fab.setImageResource(R.drawable.ic_save);