In Android Studio, I can't figure out where to put images to be used inside the app. The drawable folder isn't broken down into drawable-hdpi, drawable-ldpi, etc. I saw another question asking this and the answer was to switch to Project view instead of Android view but drawable is only one folder there too. There is mipmap-hdpi, mipmap-ldpi, etc, but people are saying that's only for app icons. I'm confused.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Actually you have selected Android from the tab change it to project.
Steps
Then you will found all folders.
There are two cases:
If you are having a single image, irrespective of device version, then you should put your images in drawable folder.
But for the images that you created separately for hdpi, ldpi, mdpi, xhdpi, xxhdpi and xxxhdpi, depending on screen resolution of the mobile that will be using the app, you have to puy them in drawable-hdpi, drawable-ldpi, drawable-mdpi, drawable-xhdpi, drawable-xxhdpi and drawable-xxxhdpi folders respectively.
For the first case, if there is a single image, you can pretty much place it in any drawable folder, but its standard convention to put them in drawable folder.
This tool creates the folders with the images in them automatically for you. All you have to do is supply your image then drag the generated folders to your res folder. http://romannurik.github.io/AndroidAssetStudio/
All the best.
Its little tricky in android studio there is no default folder for all screen size you need to create but with little trick.
i cant post image here so if still having any problem. here is tutorial..
Drawable folder in android studio
In Android Studio 1.2.1.1
Just copy the image and paste the image into the app > res > drawable folder and it will shows you "Choose Destination Directory" popup screen as shown below screen
Now you can select option whatever resolution you want to place and if you want to view the those image into the folders then simply right click on the drawable folder > select copy paths option and open it. It will help you.
If you don't see a drawable folder for the DPI that you need, you can create it yourself. There's nothing magical about it; it's just a folder which needs to have the correct name.