In this tutorial, InshaAllah we will learn how to create or import drawable folders & call some images from these folders in android studio. What exactly drawable folders used for? Well drawable folder is used for to store images or pictures when we need to show it on our android application. By default, drawable folders aren’t have been created while creating new project in android studio. So we have to create drawable folders manually if pictures are needed. Let’s see how to create folders and put pictures into them,
First of all you will need to open your project and wait that android studio finish loading.
Now right click either on Java folder or res folder under project & select New > Android Icons Importer.
Recommended : How to Create Your First Android App – Hello World App
In the importer window, leave all the option by default and hit ok button. That’s it. Boom
Now all you need to do is find your android project location in your system. By default, most of android studio projects are stored on C:// Users/username/AndroidStudioProjects.
Once you found the project, click on Your Project > app > src >main > res > drawable.
Here you may noticed there are many drawable folders, remember that these are the dimension of drawable folders. You can put high quality images or pictures in specific folders. This is because if you put all high quality pictures in low dimension folder then it may slow down your app performance. So it better to put pictures on appropriate drawable folders.
Remember that the image / pictures name should be start from lower case and the same name will have be written in coding otherwise it will give your errors. For example, best way to call your image from drawable folder & In xml layout is,
All done, this is how to import drawable folders and images in android studio. If you found this post helpful, please share it with your friends because sharing is caring and don’t forget to subscribe our blog for more interesting tutorials.