on my Kindle Fire home screen the icon of my application sometimes is shown as a plain gray square. Rebooting device returns normal application icon back. is it a known issue on Kindle fire?
Kindle shows the image uploaded on amazon market to show on home screen, you can add a app as a favorite and it will show you the app icon mentioned in manifest, please make sure you have a high res image uploaded on amazon market as thumbnail. side loaded app cannot use this feature
The way I solved this is to put in 512x512 icon. I know it's not pretty, but it gets job done, as all Android devices resize icons to appropriate size.
If somebody has better solution that doesn't involve uploading app to Amazon Market - please let us know.
Do you have the MDPI, HDPI, and XHDPI icons all going? I think it might be showing a grey box because one of those isn't in there.
(If you submitted your app to the app store, it's the HDPI icon. If you didn't, it's the MDPI icon. Because of this, it might be getting confused as to which icon to get. Also, you can replace your MDPI icon with a 200x200 image to make it appear hi-res in the Kindle Fire.)
I believe the best solution is to use custom drawable folders for kindles
custom drawable "drawable-1024x600-v10" with ic_launcher.png for KindleFire 1 st Gen
custom drawable "drawable-1024x600-v15" with ic_launcher.png for KindleFire 2nd Gen
custom drawable "drawable-1280x800" with ic_launcher.png for KindleFire HD-7'
custom drawable "drawable-1920x1200" with ic_launcher.png for KindleFire HD-8.9'
Using these drawable folders will ensure that the kindle icons will look good. meanwhile use your standard Android icons in the standard drawable folders.
ldpi (120 dpi) (Low density screen) 36 x 36 px
mdpi (160dpi)(Medium density screen) 48 x 48 px
hdpi (240 dpi)(Highdensity screen) 72 x 72 px
xhdpi (320 dpi) (Extra-high density screen) 96 x 96 px
Related
I'm new to android programming and every single somewhat-similar question is from three or so years ago and doesn't really answer my question. Android Studio used to have different drawable folders for different dpi. Now there is only one. So if I have two images with the same name but for different dpi, where do I add them so that during runtime the phone can use the appropriate image?
Also, most android phones now are xhdpi or xxhdpi--do I really need to include any images less than that? And how exactly would I do that? Say, for example, that I get an image off shutterstock. How do I make it so it works correctly for both xhdpi and xxhdpi?
Those folders have not gone anywhere, if you want them you simply create a new folder and name it appropriately ( drawable-xxhdpi etc.. )
Depending on IDE it just does not make them by default under certain circumstances
DENSITY SIZE LOCATION RATIO SCREEN MARGIN
XXXHDPI 192×192 drawable-xxxhdpi 4 640 DPI 12 to 16 pixels
XXHDPI 144×144 drawable-xxhdpi 3 480 DPI 8 to 12 pixels
XHDPI 96×96 drawable-xhdpi 2 320 DPI 6 to 8 pixels
HDPI 72×72 drawable-hdpi 1.5 240 DPI 4 to 6 pixels
MDPI 48×48 drawable-mdpi 1 160 DPI 3 to 4 pixels
MDPI 48×48 drawable (Cupcake) 1 160 DPI 3 to 4 pixels
LDPI 36×36 drawable-ldpi 0.75 120 DPI 2 to 3 pixels
NA 512×512 Google Play NA NA As required
Android Studio used to have different drawable folders for different dpi.
It still does.
Now there is only one.
No, there are several. However, in the "Android" project view, they are shown in a collapsed state:
If you change the drop-down towards the top-left of that screenshot to "Project", you will get the view that you are used to, that mirrors the filesystem:
So if I have two images with the same name but for different dpi, where do I add them so that during runtime the phone can use the appropriate image?
The same place as before. Personally, I find the "Android" project view to be singularly useless, and so I switch to the "Project" view as one of the first things when I open the project.
most android phones now are xhdpi or xxhdpi
No, right now, only about a third are.
do I really need to include any images less than that?
I would. If you have a zillion drawables, you are welcome to experiment with having fewer densities, but you will want to test the lower densities to confirm that the downsampling of your drawables is turning out OK.
Create the folders yourself as you need them. It's true that most phones now are xhdpi but what about your target audience? Are you sure their phones and tablets support xhdpi at minimum? There are some tablets such as the Galaxy Tab 2 which are below these values. Just something to keep in mind. Although, consider using layout-sw(x)dp for devices bigger than 600dpi
You'll have to resize them for the appropriate drawable. Use you should follow the 3:4:6:8:12:16 scaling ratio where 48x48 is the baseline. As an example, in order to support xxxhdpi your drawables would be 192x192
Actually Android Studio also has multiple drawable folders. But It remains wrapped in Project Structure's Android View.
So you see only one Drawable folder.
If you want to see all the drawable folders in expand mode then click on the drop down like below and select "Project":
Now you can navigate the drawable folders like this:
As the doc mentioned,the launcher icon is 48*48dp.
So I think the launcher icon should be 144 * 144px on my nexus 5.
But I research a screenshot of my nexus 5,I find it's almost 166* 163px.
Why it's bigger than 144*144px?
Is my method of calculating the size wrong?
(p.s. an app with a 144*144px icon in the drawable-xxhdpi folder is also shows 166* 163px in the launcher.)
This is my screenshot:
Per the info provided by someone working at Google, Nexus 5's launcher uses the launcher icon in the next DPI bucket, i.e. on Nexus 5 it will use one DPI bucket up XXHDPI --> XXXHDPI, which makes the icon 192x192. The reason why your measurement is less than 192 is because the launcher icon graphics is not supposed to fill the whole image.
Nexus 5 is XXHDPI device.These device DPI are around 440. So, Google Nexus 5 need to add a 144*144px icon in the drawable-xxhdpi folder.
I used android asset studio to create Launcher icon:
http://android-ui-utils.googlecode.com/hg/asset-studio/dist/icons-launcher.html#foreground.space.trim=1&foreground.space.pad=0&foreColor=33b5e5%2C0&crop=0&backgroundShape=bevel&backColor=ffffff%2C100
The studio generated images at proper pixel sizes: 48 * 48 (mdpi) 72 *72 (hdpi) and so on..
But on my Samsung galaxy s2 the app icon appear smaller then other apps and not filling its entire space.
Whay is this? how can i stretch it to full extent?
Asset studio adds unnecessary margins to the icon. If someone can come up with a similar tool without adding margins, it would be of great help. The solution to your problem is to use a single 512 by 512 image as icon. Android will scale the rest for you when users install your app.
Instead of importing image through Image Asset in Android Studio, make 5 images with different size:
48 x 48
72 x 72
96 x 96
144 x 144
192 x 192
And then directly copy in respective Drawable folder (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi) with same name.
I have the same problem with the Asset Studio on Android Studio.
The only work-around was to make the images myself. Most of the time, just providing one image at 192*192 worked for me, instead of creating the whole mipmap.
Check the drawable-hdpi folder, and see if it has the correct one. The SII has a HDPI density, so you might have copied the icon into the wrong folder.
Source: http://blog.blundell-apps.com/list-of-android-devices-with-pixel-density-buckets/
Finding myself in the same situation, I generated the so called web icon, which gave me the rounded corners and shadow and the size big enough to remove padding and produce all the required sizes myself in a graphic editor.
Put a 512 * 512 icon in drawable folder instead of mipmap and then from Android Manifest reference it through android:icon tag
android:icon="#drawable/app_icon"
Worked for me, no margin on corners.
My apk icon goes blurry when creating the apk.
I tried even to download some apk that has a very sharp (android app) icon and placing it
inside of my apk but I get the same result.
how is it possible that my icon goes blurry when I see it very sharp in other app using the same icon?
of course I used multiple icon size:
ldpi (120 dpi) (Low density screen) 36 x 36 px
mdpi (160dpi)(Medium density screen) 48 x 48 px
hdpi (240 dpi)(Highdensity screen) 72 x 72 px
xhdpi (320 dpi) (Extra-high density screen) 96 x 96 px
but it didn't help. how can I fix it?
Thank you
A little late to the party, but if someone searches for this issue, you might want to check if your icons are in /drawable or /mipmap. Latter really bumps the quality up, if you haven't had your launcher icons in there before.
See also:
mipmap drawables for icons
http://android-developers.blogspot.de/2014/10/getting-your-apps-ready-for-nexus-6-and.html
As all answers suggesting that please check all drawable and mipmap folders but there is something else in my case that I had an extra folder mipmap-anydpi-v26 in which I also have the app icon that icon was creating the problem. So I just simply remove the mipmap-anydpi-v26 folder and after that everything is working fine.
I found my mistake. I should have known that android:thumbnail is not android:icon, and the thumbnail resolution should be higher (I couldn't find documentation),
Another reason it may be blurry:
If you are using an xml icon inside drawable, check for the values android:width and android:height, be sure they are large enough (for example: '128dp').
What works for me was use "density" instead "qualifier" in config.xml icon tag:
<icon density="ldpi" src="www/res/icons/android/drawable-ldpi-icon.png" />
If you are getting blurred image while compiling and running from android studio make sure that if you find mipmap-anydp folder delete that!.
So for the different screen sizes, you have the following sizes for the launcher icons:
ldpi (240 x 320px) icon 36x36, 120dpi
mdpi (320 x 480px) icon 48x48, 160dpi
hdpi (480 x 800px) icon 72x72, 240dpi
xhdpi (720 x 1280px) icon 96x96, 320dpi
(Google Play 512x512)
If you use those sizes without padding, I've noticed that the icons are bigger than for example the ones youtube and facebook use. Does anyone know the size of those icons (or the padding)?
Even better, can I download somewhere templates with the same sizes, such as http://developer.android.com/shareables/icon_templates-v4.0.zip?
Thanks
The best example I have seen is foursquare's open source android version. If you download the source you'll be able to browse through the res/drawable-xxx folders and see how they handle various cases with their icons that appear to be approximately the same size as, say, facebook's android icons (maybe a pixel or two more padding).
I recommend checking out this project and simply examining their files in your photo editor of choice.
Just as a note: foursquare is no longer open sourcing their app (and hasn't for some time now...), so the code found at the above repo may be a little stale.