android-studio - Not have drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi
问题描述
WorkSpace:Android Studio
I have 35 images. I have realized that I have drawable (but not have "drawable-mdpi, drawable-xhdpi..") folder and also there are "mipmap-mdpi.." folders.
- I put my images to the simple drawable folder. --> It gives me error: "Canvas trying to draw too large bitmap" I search little bit and I found "Canvas: trying to draw too large bitmap" when Android N Display Size set larger than Small that someone in the link said that I should move images to the "drawable-xhdpi" folder. I tried to move my images to the "mipmap-xhdpi" as you might be know I don't have any type of drawable folders. Only drawable I have.
- I wanted to use "mipmap" folders for "Images." It works now but maybe it is not best practice
- After that I have search it little bit and I found Mipmaps vs. drawable folders and someone answered (878 up vote) that mipmap folders is for icons.
What Should I do?
- Resize the images and put it back to the drawable
- Do not move your images to the drawable again, it can stay in the mipmap folder no problem. The person in the link said wrong.
Thank you for your attention.
And very very important and last question is should i resize one image into 4 , and put one of them into mdpi, one of them hdpi, one of them xhdpi and one of them xxhdpi? if yes , it means if i have 30 images, i should resize and make it 120 images?
解决方案
推荐阅读
- c++ - C++ 向量 push_back 没有复制?
- redis - 检查管道中的 BRPOPLPUSH 是否超时
- ios - “..将此密码保存在您的钥匙串中..”和“...将此密码保存在您的 icloud 钥匙串中”消息同时显示
- python - 如何从 pandas 中的每日数据创建每周时间序列
- html - Kendo UI 过滤器“包含/不包含”过滤器工作正常,但其他过滤器不适用于 Django 对象
- nginx - 如何在带有 Nginx 的 Centos 中使用 keep-alive 来减少没有缓存的 API 响应?
- android - 使用 google 登录无法在应用程序内使用 android WebView。在本地服务器上工作
- python - 使用 popen 在 2 个 python 脚本之间进行通信
- asp.net - 无法加载文件或程序集'log4net,版本 = 1.2.10.0?
- docker - 是否可以在运行命令时创建处于当前状态的 Docker 容器的副本?