I started using Android Studio recently and I found one thing different (notably) that unlike in Eclipse, Android Studio does not provide any option to choose app icon and its shape & size while creating a new app.
While finalizing my app development I tried to change default 'ic_launcher.png' with my own image but I am not able to change its shape (which is square by default) to circular.
So my question is - Is there any way of changing app icon shape in Android Studio ?
And if this question is already been solved on some other thread then please share that link with me. (P.S.- I tried to search with similar question here but couldn't find probable solution, therefore posting this question on my own)
Just add new Icons in all drawable folder and update the icon name in manifest file.
To change the icon shape following tool can be usefull:
http://romannurik.github.io/AndroidAssetStudio/
Sorry for the late answer first of all. Here is my answer:
While launching Android Studio 1 RC in Beta Channel, they did not add this feature of adding image assets to the app directly from the Android Studio.
But since Android Studio 1.1 update, this feature is available to use.
Here is how you get different icons:
Click on res under app directory of you project.
New --> Image Asset
Choose Asset Type (Launcher Icon | Action Bar and Tab Icons | Notification Icon).
Choose your Image from the directory and perform other necessary changes to get the icon you desire.
Click next and then select
Type Module and Res Directory and click Finish.
You will see your icons under res folder directory.
I hope this was helpful, thank you!
Related
I have an app in android studio. I created a launcher icon with a foreground and background PNGs. This works fine.
Now I want to clone this app to make a white-label version for a customer. Change name, some behavior, colors, etc. I have a bash script that does that nicely for me. I can even inject a Java class to modify behavior. Then I build and ship.
The problem I am having is with the launcher icon. When I first created it in Asset Studio, I just selected the background image, the foreground image. It then generated those images in multiple formats. For example, with xxhdpi:
$ ls ./app/src/main/res/mipmap-xxhdpi/
ic_launcher_background.png ic_launcher_foreground.png ic_launcher.png ic_launcher_round.png
The background and foreground images are just resized versions of my resources, but the two other files are "rendered" versions of my icon, one square and one rounded. I am for now overriding them with ImageMagick, but I feel that's not the way to do it.
My question is: Is it possible to replace the background and foreground and have Android Studio regenerate the "rendered" versions of the icons from the command-line ?
I used to use plugin android drawable importer, it had some bugs but it worked fine. But by Android Studio 3.6.1, this plugin began to not working anymore. And now it is also not listed plugin marketplace.
Here is the thing that I want to do; I have an icon on computer. I want to import this icon to correct drawable folders with correct sizing. And sizing should be done automatically.
I know image/vector asset menus. But these do not make what I want. Vector asset menu does not provide png or jpeg. And the image asset menu does not make transparent background.
What is the correct and easiest way to do that? I am not a designer. I can not deal with every icon to every size. This is done automatically by the plugin or android studio itself.
I'm trying to change the icon of my app in android studio.
I am importing it with Android Studio like this.
(which normally should work)
But on my mobile the App Icon looks like this.
I don't now what I'm doing wrong so any help is appreciated :)
With pngs it's kinda difficult.
You may want to try using vectors:
First
Export your logo (using for example photoshop) as a SVG
Then use this Website to convert it to xml code: http://inloop.github.io/svg2android/
Create a new drawable file and copy the code of the website into your file.
Then try creating your Launcher Icons using your drawable resource file
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.
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 ;-)):