Bitmap generateBackgroundTile(int backgroundType) {     	Bitmap bm = null;     	switch (backgroundType) {     	    case 0: 			bm = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.default_1);     			break;     		case 1: 			bm = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.women_2);        			break;     		case 2: 			bm = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.men_1);     			break; 		    case 3: 			bm = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.men_2);     			break; 		    case 4: 			bm = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.blank_bg);     			break; 		    default: 			bm = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.default_1); 	            break;      	}     	return bm;     }      @SuppressWarnings("deprecation") 	public void updateBackground(int backgroundType) {     	Bitmap bitmap = generateBackgroundTile(backgroundType); 		BitmapDrawable bd = new BitmapDrawable(bitmap); 		mCanvasView.setBackgroundDrawable(bd);     }