How to pass image data from one activity to another activity?

后端 未结 9 735
一生所求
一生所求 2020-11-30 14:26

I am using two activities. One activity displays images in a GridView and by clicking on a particular image in that GridView it should display the

9条回答
  •  孤独总比滥情好
    2020-11-30 14:59

    You pass parameters to an Activity in an Intent. If the image comes from a file, pass the path String, otherwise pass the Bitmap

    startActivity(new Intent(this, YourActivity.class).putExtras(new Bundle().putParcelable("bitmap", Bitmap)))
    

提交回复
热议问题