{"id":744,"date":"2016-05-19T06:10:34","date_gmt":"2016-05-19T06:10:34","guid":{"rendered":"http:\/\/abhiandroid.com\/androidstudio\/?p=744"},"modified":"2018-06-05T07:19:51","modified_gmt":"2018-06-05T07:19:51","slug":"create-different-folders-adding-different-resolution-images","status":"publish","type":"post","link":"https:\/\/abhiandroid.com\/androidstudio\/create-different-folders-adding-different-resolution-images.html","title":{"rendered":"How To Create Different Folders For Adding Different Resolution Images In Android Studio"},"content":{"rendered":"<p>Android support a wide range of devices and if you want to create an application in android then your application must be compatible with the different mobile devices. For supporting the different screen sizes you must have different size images which you will save in various folders. Usually Android has four folder which covers almost every device:,drawable-ldpi, drawable-mdpi,\u00a0drawable-hdpi,drawable-xhdpi.<\/p>\n<p><strong>Background Images Dimensions for these different folders are as follows:<\/strong><\/p>\n<p>ldpi\u00a0 = 240&#215;320 pixels<\/p>\n<p>mdpi = 320&#215;480 pixels<\/p>\n<p>hdpi = 480&#215;800 pixels<\/p>\n<p>xhdpi = 720&#215;1280 pixels<\/p>\n<hr \/>\n<h4><strong>How to Add\/Create different folders for adding different resolution Images in Android Studio<\/strong><\/h4>\n<p><strong>Step 1:<\/strong> First of all you must have different images for these folder with given resolution. You can get the images in different resolutions through\u00a0<a href=\"https:\/\/romannurik.github.io\/AndroidAssetStudio\/nine-patches.html\" target=\"_blank\">9-Patches<\/a>\u00a0or you can use any high end image editor tool like\u00a0Adobe Photoshop.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-780\" src=\"\/androidstudio\/wp-content\/uploads\/2016\/05\/different-image-resolution-tool-Android.jpg\" alt=\"different image resolution tool Android\" width=\"380\" height=\"256\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/different-image-resolution-tool-Android.jpg 380w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/different-image-resolution-tool-Android-300x202.jpg 300w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/p>\n<p><strong>Step 2:<\/strong> Once you have all the images with you, now it&#8217;s time to create the folders for images. Navigate to Project View in Android Studio<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-769\" src=\"\/androidstudio\/wp-content\/uploads\/2016\/05\/Project-perspective-Android-Studio.jpg\" alt=\"Project perspective Android Studio\" width=\"349\" height=\"207\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Project-perspective-Android-Studio.jpg 349w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Project-perspective-Android-Studio-300x178.jpg 300w\" sizes=\"auto, (max-width: 349px) 100vw, 349px\" \/><\/p>\n<p><strong>Step 3:<\/strong> Go to App folder src &gt; main &gt; res folder.<\/p>\n<p><strong>Step 4:<\/strong> right click on res folder. select New and then click Directory.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-771\" src=\"\/androidstudio\/wp-content\/uploads\/2016\/05\/Create-New-Directory-in-res-Android-Studio.jpg\" alt=\"Create New Directory in res Android Studio\" width=\"673\" height=\"278\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Create-New-Directory-in-res-Android-Studio.jpg 673w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/Create-New-Directory-in-res-Android-Studio-300x124.jpg 300w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/p>\n<p><strong>Step 5:<\/strong> Enter the name of your directory for example: drawable-ldpi.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-781\" src=\"\/androidstudio\/wp-content\/uploads\/2016\/05\/drawable-ldpi-directory-android-studio.jpg\" alt=\"drawable-ldpi directory android studio\" width=\"431\" height=\"151\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/drawable-ldpi-directory-android-studio.jpg 431w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/drawable-ldpi-directory-android-studio-300x105.jpg 300w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/><\/p>\n<p><strong>Step 6:<\/strong> Now you have&#8221;drawable-lpdi&#8221; folder inside res folder. You can create rest of the folder &#8220;drawable-mdpi&#8221;,&#8221;drawable-hdpi&#8221; and &#8220;drawable-xhdpi&#8221;.<\/p>\n<p><strong>Step 7:<\/strong> You can paste the different resolution images inside respective different folders.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-782\" src=\"\/androidstudio\/wp-content\/uploads\/2016\/05\/paste-images-in-drawable-ldpi-android-studio.jpg\" alt=\"paste images in drawable ldpi android studio\" width=\"534\" height=\"184\" srcset=\"https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/paste-images-in-drawable-ldpi-android-studio.jpg 534w, https:\/\/abhiandroid.com\/androidstudio\/wp-content\/uploads\/2016\/05\/paste-images-in-drawable-ldpi-android-studio-300x103.jpg 300w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/p>\n<p><span style=\"color: #ff0000;\"><strong>Important Note:<\/strong><\/span> While pasting images to different resolution folder, keep one thing in mind all the images should have common name. For example: inside\u00a0drawable-hdpi &gt;image.png then\u00a0drawable-xhdpi &gt;image.png. That means name of the images is same but every image have different resolution. So in this way you just have to write android:background:@drawable\/image and android will automatically adjust the image as per different mobile resolution.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Android support a wide range of devices and if you want to create an application in android then your application must be compatible with the different mobile devices. For supporting the different screen sizes you must have different size images which you will save in various folders. Usually Android has four folder which covers almost &hellip; <a href=\"https:\/\/abhiandroid.com\/androidstudio\/create-different-folders-adding-different-resolution-images.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How To Create Different Folders For Adding Different Resolution Images In Android Studio<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,1,65],"tags":[],"class_list":["post-744","post","type-post","status-publish","format-standard","hentry","category-android-studio","category-archieve","category-layout"],"psp_head":"<title>How To Create Different Folders For Adding Different Resolution Images In Android Studio \u2013 Abhi Android<\/title>\r\n<meta name=\"description\" content=\"Steps to create different folder (i.e. drawable-ldpi, drawable-mdpi, drawable-hdpi,drawable-xhdpi.) for adding different resolution images in Android Studio.\" \/>\r\n<meta name=\"robots\" content=\"index,follow\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/abhiandroid.com\/androidstudio\/create-different-folders-adding-different-resolution-images.html\" \/>\r\n","_links":{"self":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/comments?post=744"}],"version-history":[{"count":1,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/744\/revisions"}],"predecessor-version":[{"id":1464,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/posts\/744\/revisions\/1464"}],"wp:attachment":[{"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/media?parent=744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/categories?post=744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abhiandroid.com\/androidstudio\/wp-json\/wp\/v2\/tags?post=744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}