How to pass bitmap from one activity to another

后端 未结 4 1662
再見小時候
再見小時候 2020-12-04 02:11

i have bitmap in ActivityA i want to pass the bitmap from here to ActivityB, i googled for this. when i use this

Intent intent = new Intent(this, NewActivit         


        
4条回答
  •  感动是毒
    2020-12-04 02:54

    You can simply name you Bitmap as static first.

    then create a method like

    public static Bitmap getBitmap(){
    return bitmap;
    }
    

    then you can simply call from other activities,

    bitmapwantedclass.getBitmap();
    

    Hope it helps

提交回复
热议问题