Image View not Wrapping Contents

后端 未结 3 590
再見小時候
再見小時候 2021-01-31 01:24

I\'ve got an ImageView wrapping this image:



        
3条回答
  •  清歌不尽
    2021-01-31 01:50

    if you try to add the large size image for eg let say 4~6 mb and you are using the drawable,then you would get the error like->java.lang.RuntimeException: Canvas: trying to draw too large(537528960bytes) bitmap

    For java do this in your android studio, but the concept remains same for others also,do this to insert the image in your app in the background, applicable for both large and small size images.

    Basically move your image in the (hi-res) drawable to drawable-xxhdpi which would be finded by going in the app->res->mipmap.

    
    

提交回复
热议问题