tags:

views:

30

answers:

1

hello guys,

i have rectangles and images and i want to show that images on that positions that rectangle holds in it...it is all dynamic. and i am using bitmap class to display but now i have to set positions according to that rectangle...

please help. thanks a lot.

A: 

after googling so much finally i got my result..so i thought lets share it for others..Override onDraw() method and put this code in it.

Paint paint = new Paint();

this.setbMap(BitmapFactory.decodeByteArray(imageTile, 0, imageTile.length));

Bitmap adapt = Bitmap.createBitmap(bMap);

canvas.drawBitmap(adapt, rect.left, rect.top, paint);

sajjoo