In reviewing the code of an App, I see that it uses the background image setting for an ImageView with an empty foreground image:
staticon.setImageResource(0);
staticon.setBackgroundResource(R.drawable.switch_to_on);
What are the pro’s and cons of this approach? Will it be safe to refactor this to just use the foreground image? The drawable being set is a Frame Animation.
Yes it is safe.All the widgets are designed in the way you can use according to your requirement.I dont think any unsafe situation in this code. 🙂