Sunday, 10 June 2012

call background images by code

Resources res = getResources();
Drawable drawable = res.getDrawable(R.drawable.newImage); 
LinearLayout linearLayout = (LinearLayout)findViewById(R.id.GameLayout);
linearLayout.setBackgroundDrawable(drawable);

No comments:

Post a Comment