OutOfMemory Error using ImageView

后端 未结 2 2101
挽巷
挽巷 2021-01-07 15:00

i\'m trying to make a wallpaper set app using ImageView. I know its hard to display a bunch of images (especially when images are 1920x1080), what i did was to make other bu

2条回答
  •  长情又很酷
    2021-01-07 15:43

    Move the images to a new folder called "drawable-nodpi".

    Reason

    Images in different drawable folders are opened by the android system with different memory allocations, hdpi means it will take a LOT of memory even if the image is tiny.

    drawable-nodpi is the best for memory saving.

提交回复
热议问题