【发布时间】:2010-10-03 15:36:01
【问题描述】:
我有意见。我想放置一个位图图像作为其背景图像。我做不到。
//My code is below
Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.drawable.grape);
part1 = new View(this);
Bitmap map2 = Bitmap.createBitmap(targetWidth, targetHeight,Bitmap.Config.ARGB_8888);
canvas.drawBitmap( bitmapOrg,new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight()), new Rect(0, 0, targetWidth, targetHeight), null);
part1.setBackgroundResource(map2); //i couldn't place map2 as bgresource to my view part1
谁能帮忙?
【问题讨论】:
标签: android