I want to change icons of the my application. I have created a 40x40 icon for this reason. But, I do not know how I can do that ? How can I change the icons of the application ?
And, How can I change the background image of the application ?
Go to AndroidManifest.xml, you will see this:
android:icon="#drawable/ic_launcher"
If you copy your own image to /res/drawable replace the standard icon. If you want to replace other images (wich are located in your code) you can do the same, first copy the image to /res/drawable and then replace the old image name with the new one.
You place your images in the res folders. Just copy and paste it. You can replace the current image by removing it and renaming your image to it's name. Otherwise jsut call the new image from the code
http://developer.android.com/guide/topics/resources/providing-resources.html
This online tool is very helpful in generated icons for different screen densities.
Once you've made the icon, just download it and put the icon in each drawable-X folder from the downloaded file into the corresponding folder in your project.
Then add android:icon="#drawable/filename" to your <application> tag.
For the application background, put the background image in your drawable folders in the required sizes, and then add android:background="#drawable/backgroundname" to the root layout of the Activity.
Other than that, if you prefer to manually resize your icons, here are the sizes for different densities (from here).
ldpi (120 dpi) - 36 x 36 px
mdpi (160 dpi) - 48 x 48 px
hdpi (240 dpi) - 72 x 72 px
xhdpi (320 dpi) - 96 x 96 px
Related
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!.
How can i increase the size of launcher icons . I know that my custom launcher is taking images from the drawable-mdpi folder & the allowed icon size is 48x48 . I cant increase the size of launcher icon more than this.
Please help me
the icon of luacher it prepered by system itself you just put in your resources the icons for each vervion and below the standard size for each version
LDPI - 36 x 36
MDPI - 48 x 48
HDPI - 72 x 72
XHDPI - 96 x 96
WEB - 512 x 512
There was two way
1. Create your icon using 9-patch with your required size
2. Create different size of icon and put them in different drawable size. For this to know the size for specific like hdpi, mdpi etc just create sample/ open any exiting project which was created in juno(eclipse editor).
Here the specific size detail for different devices
ldpi-36x36
mdpi-48x48
hdpi-72x72
xdpi-96x96
web - 128x128
so im working on my first app and i have a question about images
first off, theres 4 different drawable folders, do i just drop an image into one of them? what is the proper way of adding a resource image?
secondly, i know theres a bunch of different resolutions for phones. should i just use one that is say, 960x720dp? or is there another appropriate way of doing this? i want to add an image as a resource into my project, then use it as the background for my app layout...
The best way is to put 4 different versions of the image in the 4 folders . The simplest way to find out what resolution each folder must have is to use mdpi image as a reference and multiply other 3 like this:
ldpi = mdpi x 0.75
mdpi = this is the reference resolution
hdpi = mdpi x 1.5
xhdpi = mdpi x 2
Example: for an image that has 100 x 80 px as the base image, the other folder sould contain images with the following res:
ldpi = 75 x 60 px
mdpi = 100 x 80 px this is the reference image
hdpi = 150 x 120 px
hhdpi = 200 x 160 px
The best way is to create the biggest image in you image editor that you will need and make smaller variants from that. you can fint you own mathematical formula for the multiplication
If you don't want to put different variants for the image then let Android OS convert the images for you The Android OS will search the reference image in mdpi folder so make sure to put the image in this folder
More info here
You just need to paste your images into drawable folders.
To address different resoulutions, you can place different images into different drawable folders with same name, say for logo.jpg into drawable-ldpi might have image logo.jpg with resolution fit to ldpi, and drawable-mdpi have image logo.jpg with resoluiion fit to mdpi. or if any image must be same for all resolutions then place a single image into any of the drawable folder.
You can do this by adding just one images in any folder but this link of supporting multiple screens and resolution of images provide you the best way to do that. Just read that
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