What do the different folder symbols mean in Android Studio? - android-studio

I am looking at an OS project and have these folders in it. What do their icons mean? I know that the green circle signifies an application folder, but I'm not sure about the other two.

The first circle you marked in the screenshot with a blue square denotes the module while the other with the bars on it is the library

Related

Not have drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi

WorkSpace:Android Studio
I have 35 images.
I have realized that I have drawable (but not have "drawable-mdpi, drawable-xhdpi..") folder and also there are "mipmap-mdpi.." folders.
I put my images to the simple drawable folder. --> It gives me error: "Canvas trying to draw too large bitmap" I search little bit and I found "Canvas: trying to draw too large bitmap" when Android N Display Size set larger than Small that someone in the link said that I should move images to the "drawable-xhdpi" folder. I tried to move my images to the "mipmap-xhdpi" as you might be know I don't have any type of drawable folders. Only drawable I have.
I wanted to use "mipmap" folders for "Images." It works now but maybe it is not best practice
After that I have search it little bit and I found Mipmaps vs. drawable folders
and someone answered (878 up vote) that mipmap folders is for icons.
What Should I do?
Resize the images and put it back to the drawable
Do not move your images to the drawable again, it can stay in the mipmap folder no problem. The person in the link said wrong.
Thank you for your attention.
And very very important and last question is should i resize one image into 4 , and put one of them into mdpi, one of them hdpi, one of them xhdpi and one of them xxhdpi? if yes , it means if i have 30 images, i should resize and make it 120 images?

What is the safe zone in Android Image Asset Studio

In Android Studio, while creating a Launcher Icon, there is a preview of a "Safe zone" circle that defines a certain padding around the edge of the displayed boundaries.
What does it specifically define?
Adaptive Icons, which are introduced in Android O, allows the system to apply a shape mask on top of your icons, which gives users a more consistent icon theme. Instead of a mixed bag of square & circle icons, users can now be shown all square or all circle icons.
The question is, how big a mask can systems make? Can they clip away 40px (10px from each side) of your icon? How about 80px? 120px? Even 400px? So Google created a rule:
A device OEM can specify a mask that may include a radius that is as short as 33 dp along certain points of the shape.
So the "safe zone" is the area that is guaranteed to not be clipped.
It looks like Android is planning on introducing parallax effects on icons when scrolling in the home screen, when they do, icons that are not completely in the "safe zone" may get see unnatural motion with the background when they are being animated. (See the "Clock" icon, and how it "escapes" the bounds of the background)

Android Studio - Image asset without border

When I create a new image asset in Android Studio it has a white border on all four sides.
What setting should I use to avoid this ?
What I have done currently is to directly copy the images into drawable folder and use that image. This works but I don't get the flexibility of the multiple image that is generated when I use the create image asset.
If you are you speaking about this one:
Then all you can try to play with Shape, e.g.
BTW, there is Background parameter, too: you can choose any colour instead of white, if you wish.

How to flatten SVG files

There is this site http://game-icons.net/ that offers huge number of open source icons. That is 1345 SVG files to this day. I would love to use them with a web project I am working on right now. The logical step is to transform them into an icon font. Normally, I would just upload them to https://icomoon.io/app/#/select/font and voila ... but!
The icons are inverse, white symbols on a black rectangle. I can invert colors in Illustrator, but some of the icons have overlaping shapes and this breaks them when icomoon tries to make them Black-transparent.
Example: http://game-icons.net/lorc/originals/archery-target.html
The circles are white, not transparent.
How to flatten a Black-White SVG file with overlaping shapes into an icomoon friendly Black-transparent SVG?
My wish is to make the font open source as well and send it back to the site admins for everybody to enjoy.
At the moment the icons have layers of black and white paths. You are going to need to use the "merge paths" feature of Illustrator or Inkscape to make the white (or black) paths into holes where appropriate. I think this is pretty much going to be a manual task. You could write a script to help with some of the work, but I suspect you would end up needing to fix a large number of the icons afterward anyway.

Ignoring touches on transparent areas cocos2dx

I have an image of size 480x800 pixels and there is a icon on one corner which I need to place. What I want is that to ignore all touches on the transparent areas and detect only the area where the icon is.
I found a solution in SO to this problem but it just tells the code to be used. I need to know exactly where to put that code since I am a beginner and don't know much about cocos2d so I expect a step by step solution.
Cocos2d 2.0 - Ignoring touches to transparent areas of layers/sprites
Do not use glReadPixels because it affected by bugs in android drivers. You can translate CCTouch to CCPoint in image coordinates using convertTouchToNodeSpace, and read image pixel at given point.
Create CCImage from file that contains semi-transparent picture, and read one pixel at tap point; it should be {0,0,0,0} for transparent area.
Don't forget to check that tap is not outside picture, and create pixel index in CCImage::getData() array with formulae unsigned index = x * imageWidth + y.

Resources