To set Background:
RelativeLayout layout =(RelativeLayout)findViewById(R.id.background);
layout.setBackgroundResource(R.drawable.ready);
Is the best way to do it?
I have a full screen PNG I want to display on splash. Only one error there, and I have no idea
what size to put in every drawable folder (ldpi, mdpi, hdpi, and xhdpi). My application is supposed to run …
I have an image res/drawable/test.png (R.drawable.test).
I want to pass this image to a function which accepts Drawable, e.g. mButton.setCompoundDrawables().
So how can I convert an image resource to a Drawable?