I offer the ability to change the app icon via a setting... I'm thinking about adding app icons in all material colors (500 + 900 values) which results in 34 icons + 2 for black and white.
Now I'm thinking of adding them only in a few resolutions instead of all. Which one can I safely remove?
I would add:
mdpi
hdpi
xhdpi
xxhdpi
xxxhdpi
Would it work if I only add xxxhpi icons? Or xxxhdpi + hdpi? Which sizes are necessary so that it always works?
EDIT
Why do I want to do this? Just to keep my app as small as possible but having nice icons for all devices
its best to have images in all size of same name,it will take the image based on the resolution of the device
Related
I am using the onCreateOptionsMenu method to create a toolbar with icons in the MainActivity of my app. I am testing on different screen sizes and pixel densities with Android Studio's emulator. The documentation states, "Based on the density of the current screen, the system uses any density-specific resources from your app. If resources are not available in the correct density, the system loads the default resources and scales them up or down as needed." I've tried putting all of my vector icons the default drawable directory, but the system does not scale them for different screen sizes or densities at all. Nor does onCreateOptionsMenu scale the height of the toolbar or the title text. Is it supposed to? Because of this, I have also tried using different density buckets to address that problem. However, I'm running into an issue with greatly varying screen sizes sharing the same density bucket.
As an example, I'm testing on Pixel 3 (5.5" phone) and Pixel C (10" tablet). They are using the same density bucket (xhdpi) so if I use a 24dp x 24dp icon for the phone, then it looks way too small on the tablet. How do I work around this?
You can string together multiple qualifiers and create a custom bucket. So in addition to the drawable-xhdpi bucket I added a drawable-sw720dp-xhdpi bucket with larger icons for the 10" tablet. Now tablet displays the slightly larger icons while the phone still uses the standard bucket. The solution can be found in the comments of the selected answer in this post by #Theo. Unfortunately the documentation does not state that multiple qualifiers are supported.
I want to create a dashboard screen for my Android Native app, the Dashboard will have 9 ImageButtons but i am having difficulties on the size ratios for the Images in my drawable folders so that my Dashboard will be compatible on all (most) devices.
I want the 9 Image Buttons to fill the whole dahsboard with allowance being given to spaces between the buttons
Please can you give me an indication as to the sizes for my images and which drawable folders i need to place them in
Iconography is the first place to look for regarding the icon sizes. The sizes and folders as per the documentation is as follows. Note that it is for icons like actionbar icons like search. For homescreen type icons you need to magnify as per your need.
drawable-ldpi not required
drawable-mdpi 48x48 px this is the base other resolution are factor of this base
drawable-hdpi 72x72 px 1.5 times base
drawable-xhdpi 108x108 px 2 times base
drawable-xxhdpi 144x144 px 3 times base
drawable-xxxhpi 192x192 px 4 times base
Also note that images will have padding associated with it and usually have transparent background. Also for people looking for official android icons here's the download link.
I have a drawable-xhdpi-v11 folder containing a 48x48 icon which is used in my Notification:
Notification notification = new Notification(R.drawable.ic_not_logo, null, now);
I noticed on my Galaxy Nexus running JB, the icon is shrunk to 36x36, making it blurry. Why does the documentation ask for a 48x48 if it wants a 36x36? Am I missing something? Is there a way to make my notification icons pixel perfect?
EDIT:
Here is a related post
Android status bar expects icons of size 25x25dp while guidelines recommend 32x32dp. Who is wrong?
The answers in this post do not explain why it still asks for a 48x48 sized icon and down scales it to 36x36.
You should provide different version of the very same resource.
Follow the guide: android design status bar
My final conclusion is that it is impossible to have pixel perfect Notification Icons. I experimented with providing different sized icons to the drawable-xhdpi-v11 folder and it down-scales all icons provided regardless of their size, leading to a loss in resolution and blurriness of pixel perfect icons. Pretty disappointing.
You should definitely stick to the 24dp value from the guidelines, but you must provide an xxhdpi res (72px) which can then be used by Android to scale to 36px without blur. Same with app icons, some tablets use the xxhdpi res for the homescreen, even though the device is xhdpi.
I have created four versions of my launcher icon for ldpi, mdpi, hdpi and xhdpi devices. They are of dimensions 36x36, 48x48, 72x72 and 96x96.
I'm wondering what will happen when using a large screen. Consdering large screens are rouglhy 7" + in size a ldpi, large screen will surely not want a 32x32 icon image, located in a drawable-ldpi folder.
I cannot find anything on the dev guide that indicates what icon sizes to assign to large and xlarge devices. Presumably I would put a larger copy of the icon in the drawable-large and drawable-xlarge folder. However, I do not know what sizes to use. Does anyone have any recommendations?
Google provide an online tool called Android Assest Studio which creates the launcher icons in the correct size for you. http://android-ui-utils.googlecode.com/hg/asset-studio/dist/icons-launcher.html
A 7-10" tablet doesn't need anything unusually large. You don't need anything bigger than a 96x96 launcher icon for this use case. There is a table in the Launcher Icons section of the design docs that shows which sizes correspond to which densities.
Have a look at the Declaring Tablet Layouts section of the design docs for more info on how to organize resources for 7-10" screens. (Note that the resource used will depend on the screen density, it is possible that a 7" tablet will have an mdpi screen.)
Android icon guidelines says to use icon of size 36*36pixels for ldpi and 48*48 for mdpi 72*72pixels for hdpi (http://developer.android.com/guide/practices/ui_guidelines/icon_design.html). What is value that i should give as pixels per inch while creating the icon?(Photoshop shows 72 pixels/inch as default value while creating a new icon)
I am quite sure that it does not matter at all. As far as I reckon, the dpi in Photoshop and other (non vectorial) image editing software is used only when you want to print the image.
If you are not convinced, try different settings for your image's dpi and check whether that changes anything.