how to show image within another image on map in android?

后端 未结 1 841
旧巷少年郎
旧巷少年郎 2021-01-17 07:19

I want to show image within another image on map.

like

\"enter

Here re

相关标签:
1条回答
  • 2021-01-17 07:39
      public Bitmap mergeBitmaps(Bitmap manBitmap){
    
        try{
            Bitmap markerBitmap = BitmapFactory.decodeResource( this.getResources(), R.drawable.red_box_image);
            Bitmap bmOverlay = Bitmap.createBitmap(markerBitmap.getWidth(), markerBitmap.getHeight(), markerBitmap.getConfig());
            Canvas canvas = new Canvas(bmOverlay);
            canvas.drawBitmap(markerBitmap, new Matrix(), null);
            canvas.drawBitmap(manBitmap, 5, 5, null);
            return bmOverlay;
        }
        catch(Exception ex){
            ex.printStackTrace();
            return null;
        }
    
    0 讨论(0)
提交回复
热议问题