+ 1
How to place images into android (Java N-IDE)?
I have an android N-IDE on my device but instead of just having a "drawable" file, it has several files where the example image has been places in several slots. The slots it is in are called "drawable-ldpi", "drawable-mpdi" and "drawable-xhdpi". Why is this different from all the tutorials I am seeing and on what folder would I need to place an attachment to successfully locate it? (In the example the image is accessed as being in the drawable file, even though that one is empty)?
4 Respostas
+ 6
Those files(drawable-idpi(low density pixels), drawable-mpdi(medium density pixels), drawable-xhdpi(extra high density pixels) are for supporting different screen sizes/resolution or pixel denisity screen.
It's always good practice to have separate drawable files for different pixel denisity devices, but you can also just have an single drawable(named only draweble) folder where you can paste all your icons and images required for your app. But disadvantage of this way is your apps images and bitmaps are not same for the all devices vary from big to small screens. For i.g in big screens images may be seen as pixelated. Images quilty is not same in all screens, so to support big screens as well medium and small you need to put different image quality in different drawable folder.
-further more
https://developer.android.com/training/multiscreen/screendensities
+ 1
0_O-[MĂ€gĂĄr_SĂĄm_ĂkĂ _NĂŒllpÞïntĂȘr_ĂxĂ«cĂ©ptïön]~~ Thank you for the explanation.
I have put the source as @drawable/work.png but the config thing states that imported ImageView does not work. How do I fix this so the picture shows now that I have put it in the right file?
+ 1
Never mind I have realised what the problem is. Thank you for your help!
0
How did you solve the problem?