imageView is not shown in Nexus 5 (Android 6.0)

后端 未结 6 672
感动是毒
感动是毒 2021-02-08 01:17

I have an ImageView in a RelativeLayout:

    

        
6条回答
  •  执笔经年
    2021-02-08 01:32

    I had faced similar issue when the image was not getting displayed on certain Mi, Vaio devices. I narrowed it down to be the problem of image resolution being too high for those specific devices. So I used Glide image loader library to lower the resolution of an image only while opening it on image view(else the orignal size was saved in SD card) using the following code.

    Glide.with(context).load(imagePath).override(1280,720).fitCenter().into(imageView);
    

提交回复
热议问题