0

I am following a tutorial on how to use Android Studio to create android apps. This tutorial is probably a bit old, as it shows a lot of different 'drawable' folders; however, I see something different in the actual version of Android Studio (version 1.4):

enter image description here

Has 'drawable' changed with 'mipmap'? Or do the different 'drawable' folder not exist anymore? How to understand the tutorial in view of the current AndroidStudio scheme?

Bryan Herbst
  • 66,602
  • 10
  • 133
  • 120
Alex
  • 41,580
  • 88
  • 260
  • 469
  • You can sub divide the 'drawable' folder if you need to more control on the resources being used in diff resolutions. See this: http://stackoverflow.com/a/2533444/867591 – Ahmed Faisal Oct 21 '15 at 15:16

6 Answers6

1

The mipmap folders are for placing your app icons in only. Any other drawable assets you use should be placed in the relevant drawable folders as before.

Check that link: Here

Aspicas
  • 4,498
  • 4
  • 30
  • 53
0

Your screenshot appears to show an app that simply doesn't have any content in any drawable folders. If you look at the resources on disk, is there anything there?

The drawable folders may simply not exist in this project. In Android development, they are still the primary mechanism of including graphic assets.

Bryan Herbst
  • 66,602
  • 10
  • 133
  • 120
0

I see something different in the actual version of Android Studio (version 1.4)

As with most code generators, Android Studio's new-project and new-activity wizards do not create every possible file and directory. They create whatever their templates call for.

About a year ago, Google started recommending moving launcher icons from res/drawable-NNNN/ directories to res/mipmap-NNNN/ directories, despite the fact that this does not really do much good for most developers and will confuse people reading older resources.

Android Studio's templates switched to using res/mipmap-NNNN/ directories; I do not know why they still create the empty res/drawable/ directory at this time.

Has 'drawable' changed with 'mipmap'?

No, you still use res/drawable-NNNN/ for everything other than launcher icons. However, you will have to create those directories yourself, such as by right-clicking over res/ and choosing "New resource directory" from the context menu.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
0

The mipmap folders are for placing your launcher icons in only. Any other drawable assets you use should be placed in the relevant drawable folders as before.

As per Google:

It’s best practice to place your app icons in mipmap- folders (not the drawable- folders) because they are used at resolutions different from the device’s current density.

You may sub divide the 'drawable' folder if you need to more control on the resources being used in different resolutions

Ahmed Faisal
  • 4,397
  • 12
  • 45
  • 74
0

mipmaps-ZZZZ are recommended by Google to be used for launcher icons. It seems like Android studio doesn't add the traditional drawable-ZZZZ folders, so you need to create them yourself. You still use Drawable-ZZZZ folders for images/icons other then app icon. For further information please read this Google BlogPost

Umer Farooq
  • 7,356
  • 7
  • 42
  • 67
0

Those are still there you just have to follow few steps to add those folder in simple way.

Step 1 -: Select project from the above drop-down(by default android will be there)

Step 2 -: Go to app -> src -> main -> res

Step 3 -: Create your drawables like drawable-hdpi, drawable-mdpi, drawable-xhdpi etc. Done

Step 4 -: Place your images, logos accordingly

Note -: This I have explained to make the thing simpler other wise you can directly go to res and create drawable resource folder (there is no need to go under project section from the top)

Toppers
  • 559
  • 3
  • 11