How to create drawable folder in res?

故事扮演 提交于 2020-07-10 12:17:09

问题


I am trying to create drawable-hdpi drawable-xxhdpi drawable-ldpifolders for different screens but unable to create as it says the folders already exist but i can't see them also when trying to create drawable-xxhdpi folder on click nothing happens no folder's are create

Screenshots below

Can't see any drawable-xhdpi folder although it says it exist

Here on clicking OK nothing happens no folder is created


回答1:


Yes it already exist.

you have to change the project structure

Click on top left dropdown where Android Appears.

Select project from this dropdown and you will be able to see all drawbale folders.




回答2:


Its because you might not have any files inside your res/drawable-xxx folders

To access them, change your project navigation:

To do so, check the top left pane for some written as 1 Project click on that or alternatively press Alt+1 here, if you see the default selection will be Android with an android bot click on the two left-right arrow icons select Project Files and then navigate!




回答3:


You do not need to explicitly create the drawable folders for different resolutions. Whenever you will add any image to the project's drawable folder, by clicking right on the drawable folder and pasting the image there, a dialog will open up, that will ask you to select from drawable-hdpi, drawable-mdpi, drawable-xhdpi, and drawable-xxhdpi. You can then select the suitable one from the drop down, and you will be able to see the distinctions within the drawable folder itself.



来源:https://stackoverflow.com/questions/42897237/how-to-create-drawable-folder-in-res

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!