Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ursusursus opened this issue Aug 10, 2017 · 2 comments

Comments

@ursusursus
Copy link

ursusursus commented Aug 10, 2017

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
Copy link
Owner

eschao commented Aug 13, 2017

I will think about it, thanks!

@Huskyyy
Copy link

Huskyyy commented Aug 30, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants