Android App Icon Issue - android

I recently made an app for android using android studio and set the icon and put it on my phone.
The problem is in the app list the icon appears as the android logos face, but when I manage the app, the icon is correct, and when on my phone I look at the apk its also correct.
Only on the app list is it incorrect.
What I've checked so far is:
Right Click the folder system, New > New > Item asset.
Set this as the application app and the image i want.
Also in the AndroidManifest.xml I've also set the
android:icon="#drawable/ic_launcher"
and on the left, the little image appears.
Any other idea's would be appreciated.
Thanks
If any other info is needed please let me know.

android:icon="#drawable/ic_launcher"
instead of ic_launcher put your drawable name in manifest

Check that you have created app icons for all different DPI's. If you check in your res folder there will be multiple drawable folders, suffixed with the different DPI's such as hdpi, xhdpi etc.
You will have to create versions of your icon for each of the different sizes as the OS will pull the most relevant size for what it needs to display at the time, small ones for the manage app's list, larger ones for your launcher.
There's a handy web tool to do this
http://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
As a side note, the lastest android studio and the above web tool uses a mipmap folder rather than drawable for application icons, you can either just copy the images into their relevant drawable folders or change your manifest to use the #mipmap prefix.

Related

Use custom image for icon "“mdpi” and ”hdpi” AndroidStudio

So basically I have my own custom icon I have made for my application and I know how to set it via the android manifest but do I have to resize the images my self or will android studio do that for me or am I asking to much? thankyou
Android Studio doens't resize the images.
You have to create yourself the images for all densities.
It can be useful an external tool provided by ROman Nurik.
In AndroidManifest you don't have to specify the folder.
You have to use
<application
android:icon="#drawable/ic_launcher"
Android stuido will not resize your images you should have different images for different resolution and add them in drawable folder accordingly.
Yo can use Android Assets Studio for making some basic icons or you can also use different plugins for creating images.

Setting Icons For Android Application

So when I start a small application for Android, (I'm Using Eclipse if that matters) I give my application a name, minimum SDK and such. Then, when it comes down to picking a launcher icon, I created an icon with 1024 x 1024 pixels using Adobe Illustrator (if I'm clearly doing something wrong say so) and export it to .png file.
When I build my android application project, the icon is copied into the different drawable folders (mdp, hdp, xhdp...). So my question is does Eclipse already change the dp of my icon to match the different size screens? And my second question is when I add other icon (not the launcher) do I have to manual change the dp and add it to the corresponding drawable folders.
Sort of. It's not best practice to use the set of icons automatically created by Eclipse, for the very reason you mentioned. Highest quality is always manually creating the images via photoshop/fireworks/your preferred image software following these guidelines:
http://developer.android.com/design/style/iconography.html

Android: Limit scalable drawables like icon to one file

Previously I made some apps with Adobe Flash Builder. That's works great but is not the best choice is some cases so I start with developing Android apps with use of ADT.
Like in Flash Builder you can set several icons for different screen resolutions. I can understand why but found it is not really necessary when creating one high resolution icon, this works fine (scaling down is better than scaling up). This also avoid the extra work that is needed to create these icons, just one icon.
Long story short, I want to create just one icon, 144x144 pixels at 96dpi and tell Android to use this icon.
Also I want to point the application icon to the asset directory instead of the res/drawable directory. The reason for this is that the icon can be reused by the (web-)application and for another reason, I have made a webApp tool to create a compressed version of a webApp and put the contents in the asset directory of a Android project.
Because the webApp can also run in the browser I have already created some icons (like favicon, apple-touch-icon and apple-touch-startup-image) and want to reuse these icons in the Android project automaticly.
The idea is also to create an application project template so it is quite easy to create a android app of a webApp.
Question
Andy idea how to change the location of for example the application icon? Using a path doesn't work (it generates an error, can't compile).
android:icon="#drawable/ic_launcher"
android:icon="assets/appicon.png" #<- doesn't work
Actually found the solution myself and is pretty simple. The only thing that is a bit tricky in ADT to validate the new declaration because at first 'it says' that the declaration is invalid. The workaround is to cut (ctrl+X) the declaration, do a project clean by Project|Clean and then put it back by paste it again (ctrl+V). Weird but true ;-)
You can declare a string resource like this (in XML file):
<resources>
<string name="app_icon">assets/appicon.png</string>
</resources>
android:icon="#string/app_icon" <- this works
Then you can use just one high-res icon image as icon for all devices! Looks great! See also picture below (between red rectangle ;-)):

Can Eclipse automatically generate different DPI images for Android projects?

I'm trying to import a 600x600 PNG I made into my Android project so that I can use it as a full-sized image in an Activity. Dragging and dropping it onto my /res folder just puts it in that folder, which of course generates an "invalid resource directory name" error.
I can drop it into any of the /res/drawable folders and that works fine, except then it's only in that one folder.
Surely, there's an inbuilt tool which can take my image and scale it appropriately for each /res/drawable folder.
AFAIK there isn't.
What you can do though, is use the drawable-xhdpi folder only. Android will automatically scale down for lower dpi.
The only exception is the launcher icon. You will have to provide all sizes (don't forget xxhdpi for tablets!).
You can find the needed sizes in the Icon Design Guidelines.
It is important to note that the ADT plugin does have tools for generating some icons sets, such as Launcher icons, Actionbar icons and Notification icons.
These tools can be accessed by opening the New wizard (Ctrl + N) and double-clicking Android Icon Set in the Android category.
there's an inbuilt tool which can take my image and scale it appropriately for each /res/drawable folder.
For the scaling part, check out the Icon Generators Tools # Android Asset Studio. There are tools for generating Launcher icons, Tab icons, Action bar icons and (in your case) Generic icons.
Luckily this changed - you are now able to autogenerate different densities - take a look at:
https://code.google.com/p/android-drawable-converter/
If you put your drawable resources in /res/drawable, that resource will be used for all devices.
However, it probably won't do exactly what you want. I would recommend scaling the assets yourself. If that isn't a viable option, then you are stuck with letting Android do the scaling for you.

Android standard icon for feedback/report by users

I want to add a feature on my app to let users give a feedback on data. (for example to report errors or mistakes).
Is there a standard icon for it?
please, visit your android-sdk-* folder, there should be default set of icons and pictures in the ./platforms/android-XX/data/res/drawable-Xdpi/ where "XX" and "X" stand for your android version and screen size. all the standard icons are there.
There are a few system icons whose filenames match 'feedback', but none of them look appropriate to me.
Best I could find is "ic_menu_report_image.png".
I've been using "ic_menu_start_conversation.png".
Whether it’s useful for your app mainly depends on the iconset you’re already using. In a chat-app for example, this icon would be a poor choice :)
Note: this icon is marked as protected. You'll have to copy the images to your source manually.
Because these resources can change between platform versions, you should not reference these icons using the Android platform resource IDs (i.e. menu icons under android.R.drawable). If you want to use any icons or other internal drawable resources, you should store a local copy of those icons or drawables in your application resources, then reference the local copy from your application code. In that way, you can maintain control over the appearance of your icons, even if the system's copy changes.

Categories

Resources