Please help, I am playing with small example of day-night mode in Android. So far so good. I have 2 images (of multiple size) that I am displaying depending on the phone mode (day/night), unfortunately I can't get it how, to name the folders that contain the images (in different resolution) in order to have a separate distinction. For the proper moment, the picture below contains the last try:
and the error:
Also I would like to have this structure into separate landscape/portrait folders us well. Thanks in advance.
Simply go to project Explorer and change your View from Android to project from drop Down and you are good to go. There you can simply create folder like we do in Eclipse. And in android project view it is hidden but when you switch to project. You can create folder like drawable-hdpi,drawable-xhdpi .
In Android Studio inside the res folder, one can find the drawable folder, layout folder, mipmap folder, values folder, etc. Among them, the drawable folder contains the different types of images used for the development of the application.
Drawable xhdpi 官网 Compatible with IntelliJ IDEA (Ultimate, Community, Educational), Android Studio and 13 more. Quickly and easily convert images into images of various densities (LDPI, MDPI, HDPI, XHDPI, XXHDPI, XXXHDPI) used by Android.
A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML resource with attributes such as android:drawable and android:icon . There are several different types of drawables: Bitmap File.
It should be /res/drawable-night-**
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With