eschao / android-PageFlip

3D Style Page Flip on Android
Apache License 2.0
1.74k stars 262 forks source link

Move drawables to "drawable-nodpi" instead of "drawable" to get correct bitmap sizes #18

Open ursusursus opened 7 years ago

ursusursus commented 7 years ago

Hi, in demo your bitmaps in memory are astronomically huge as they are in "drawable" folder, which is "drawable-mdpi" and if you run it on modern xxxhdpi phone, you will get multiplier * 4 (i think) of each dimension, there fore each bitmap is 16times bigger in memory (124mb+ bitmaps)

eschao commented 7 years ago

I will think about it, thanks!

Huskyyy commented 7 years ago

经过测试,在 480dpi 的手机(屏幕尺寸 1080x1920,华为,api 24)上,解析出来的 bitmap 的大小是 3240x5760,将 1080p 的图片放入 drawable-xxhdpi 目录下则为正常大小 1080x1920。可以考虑将图片放入不同的 drawable 目录。