How to set a background image for a controller in Android

Drawable d = getResources().getDrawable(R.drawable.pho_cellbackground);

“pho_cellbackground” is the image name. You must include that image in ‘res’ folder in order to refer it. Image file name must be in lowercase and it is preferred that it’s in PNG format.

No comments: