i want to open an image in another activity when clicked on the item in the listview

前端 未结 2 1656
耶瑟儿~
耶瑟儿~ 2021-01-23 14:44

I wrote the following code but I am sure that I did something wrong in the method onItemClick() My listview is displaying properly and when clicked upon another activity opens I

2条回答
  •  被撕碎了的回忆
    2021-01-23 15:14

    here you didnt define any location of your image. define the location string and put in the file and check it.

    String location="storage/img1.jpg";
    
    File imgfile = new File(location);
    

提交回复
热议问题