ImageView에 특정 아이콘 넣기

https://stackoverflow.com/questions/21819735/how-make-mark-icon-on-picture-android

public static Bitmap getBitmapOverlay(Bitmap bmp1, Bitmap bmp2, int left, int top) {
    Bitmap bmOverlay = Bitmap.createBitmap(bmp1.getWidth(), bmp1.getHeight(),  bmp1.getConfig());
    Canvas canvas = new Canvas(bmOverlay);    
    canvas.drawBitmap(bmp1, 0, 0, null);
    canvas.drawBitmap(bmp2, left, top, null);
    return bmOverlay;
}


//using getBitmapOverlay, u need read big image ->myBitmap
//read bigSale image -> nextBitmap
//u can change left, top
myBitmap = getBitmapOverlay(myBitmap, nextBitmap, 0, 0));
myImage.setImageBitmap(myBitmap);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s