I am trying to find a way to apply background resources to several buttons. These resources are from the SDCARD. The usual way of applying resources is this:
Button b = new Button(getContext());
b.setBackgroundResource(R.drawable.button_states);
//where button_states is an XML file
But I do not know how to apply a background, if the XML file is from the sdcard. Any ideas?
Use below code for that, it may help you.