I am having difficulties in changing the icon of an Android app. I have followed these instructions:
Right click on the project
Select New -> Image Asset
Select 'Asset Type' as Image
Select Path of and .png image
Optional: padding, trimming etc.
Next and Finish
This changed the icon in minmap/ic_launcher.png content, however, this does not change the minmap/ic_launcher_round.png folder content. This results, if the Android System is configured to show round icons, the icons to be shown in this folder: minmap/ic_launcher_round.png. But I could not find the way of changing the content of that particular folder.
I have tried to select a round shaped image in the Path, but still did not work.
If I set my Android phone to display app launcher icons as square, I see the desired icon, however, if it is changed to round, then I cannot see the my desired icon.
Please guide how to change the round ic_launchers.
The latest Android Studio generates round icons for you: Right-click the res folder, select Image Asset:
See https://dev.to/_s_farias/how-to-create-adaptive-icons-for-android-using-android-studio-459h for a more detailed walkthrough (Credit of #Guillaume Raymond).
You can try to go on AnroidManifest.xml and change path
android:roundIcon="#mipmap/ic_launcher_round"
to
android:roundIcon="#mipmap/ic_launcher"
Compile with 25 api and use "Legacy only"
Related
I know i can use my own svg as icons by browsing them from the asset studio but it just show the name not the exact icon of the svg, i can't know just by name what that icon is look like , so can i view them while adding them to project like they are showing in below image?
I have many icon on my computer can i add them to that list , so that i can see them visually when i want to add a new vector asset.
I tend to think that it can be done because then icons which android asset studio is shows must be stored in a directory from where it pulls when when i open asset stdio , if i can add my svg to that directory then android studio may may also pull them too with default clip arts and they may also show up in asset studio, does anyone know what that directory is , or any other way of doing this.
Note android studio does not give such option via UI
When you add a new vector asset (assuming you've added it in the drawable directory), it gets added in the drawable directory.
It is generally saved by the name ic_thatSVGname. So it gets the prefix IC. So please browse in the drawable directory and you will find your vector asset.
Then double click on it so that it opens and you can see the preview on right side of the screen. It it doesn't, just click the PREVIEW button which also reside on the right side of the Android Studio.
So that means just search for that in drawable directory. And while adding new vector assets, right click on the DRAWABLE DIRECTORY only so that it gets into that directory else it might end up outside it.
In android studio 3.3 when I am trying to import image for launcher icon using legacy only option its showing white background icon even after importing the image its showing same and not changing the icon with imported one.
See the screenshot:
What's the problem with android studio 3.3? Any solution?
This is a known issue in Android Studio 3.3, pending the time before it gets fixed. You can be using this awesome open source tool by someone in the community.
GOTO
https://romannurik.github.io/AndroidAssetStudio/index.html
SELECT Launcher icon generator
SELECT Image and choose the image from the explorer dialogue
Your selected image will be shown in the right-hand side as below
The finally, you can download the icon generated in mipmap folder
You can also set varieties of options from the left-hand side, options like the background color, color, padding, shape, effect and the generated file name.
I hope this helps someone.
1 > Select Launcher Icon (legacy only)
2 > Select Asset Type : Image
3 > copy paste your image path or select png image by click on the three-dot button right of the textbox
4 > Now open Shape(second last option from bottom) drop-down menu and select option None
5 > Now you can see your png image without the background as you selected
From asset studio select
Asset Type : Clipart
And select any file from the samples and confirm the image is properly appearing on the right side window.
If YES
Again select Asset Type : Image
From there you can navigate to an image path directly instead of copying and pasting image path.
Note: Please confirm that the image you choose fulfills the specifications for a launcher icon.
Usually, I import Google play icon 512*512 (Both my Google play and Launcher icons are same) to Asset studio where other icons sizes will be automatically scaled down by Android Studio Itself
Successfully replicated the issue; it appears to be a bug in Android Studio 3.3.
I have filed a bug report.
See the image:
Why does my icon look different to the other icons on the screen? In Android Studio, I set trim to zero and yet it still shows up like this on my phone. I have Nova Launcher installed which makes all my apps have rounded icons, but look at the Google Maps, and Instagram, how do I get my icon to fill the circle?
WONDERING WHY IT DOES THIS REQUIRES VERY SIMPLE EXPLANATION:
in new boiler plate code that comes on android studio project generation it makes some extra files in the mip map ! as for the big api based phones have a nature to put a round bracket icon behind every launcher icon of the apps! So All you need to do is very simple if you want to override that! follow the image based foot steps shown below
HERE IS HOW YOU CAN ADD A CUSTOM ICON WITHOUT ANY ROUND whit icon behind it!
STEP ONE! .
go on your any res folder drawable or mipmap and right click and reach to the option shown in the image:
STEP TWO! .
After clicking on your image asset it will ask to make icons for both old and new phones! but we don't have to select that! ok? see the image for it!
STEP THREE! .
CLICK THE ICON TYPE SPINNER(DROP DOWN) and select mipmap legacy only like shown here
STEP FOUR! .
CUSTOMISE YOUR PICTURE LIKE shown here! by back ground etc how ever you like!
STEP FIVE! .
You will see images being saved only in mipmap folder not in the ic_launcher round folder
STEP SIX! .
You can see the image you created as icon in ic_launcher folder
but
STEP SEVEN! .
THERE IS a GOTCHA STILL SOME IC_LAUNCHER BUILTIN TEMPLATE PROVIDED files are there you have to delete that folder as shown
:It will cause the alert that how we are supposed not to do that but its ok! just follow the step 8 and you will have the icon of your choice no matter what phone you are testing your app on!
STEP EIGHT! .
GO TO YOUR MANIFEST FILE AND DELETE THE HIGHLIGHTED line and you are all set! ^_^
With the release of Android Oreo the launcher icons changed a lot.
But with Image Asset Studio (integrated in Android Studio) we can easily generate everything we need (26+ and 25- APIs). Here is explained how these new adaptive icons work.
In this article you can read everything you need to know step by step, but in summary: you need two icons (square and rounded) for 25- APIs, and two layers (background and icon image) for 26+ APIs. Android Studio will generate everything you need if you can provide those elements.
I'm trying to import a PNG image asset to my project. But the image is losing details. It's just retaining the outer background. The image is transformed to a solid asset:
As you can see, the source asset has a white-tick in the center. But, after importing, it just remains as a solid circle with no ticks. Any solutions?
UPDATE: Tried Android asset studio, but with the same result. What am I missing?:
Thanks to Shafayat Mamun, a workaround is figured out. Here's what I did:
Go to Android Asset Studio
Select Generic Icons (it didn't work for any other option)
Upload the image, pick your color and drag down the color scale to 0% using the scale.
Download the zip and extract to the main folder of the project.
PS: This, though helped me solve my query, but the question remains intact. Why is android studio not capturing the image details while importing? Same is the case while I select Action bar and tab icons in the Android Asset Studio.
do you really need to convert it in the action bar and tab icon generator? i recommend using the simple nine-patch generator here if you want a 9patch image. or the launcher icon generator and set the shape to none and change the image's name after downloading. if you use the launcher icon generator, just modify the shape. if you use the nine-patch generator, you can click trim and click edge transparency if you want to remove the spaces beside the image.
I had the same problem and the Android Asset Studio workaround was a great help. However I discovered another work around. In Android Studio when you create an image asset, instead of selecting Action Bar and Tab icons, I chose Launcher Icons from the drop down. Then the images displayed for me. I had to search for their name and they do not get stored in the drawable folder they end up in the mipmap folder.
So the steps are:
For Android Studio:
Right click on res, new Image Asset
On Asset type choose Launcher Icons
Choose the image path
Give your image a name in Resource name
Next->Finish
The image will be saved in the /res/mipmap folder
I have a .png logo for my app which doesn't have a background, when I add it to android studio as an Image Asset I am forced to have a background. The hex field doesn't accept 8 digit color codes, 6 digits only. Is there anyway to keep the background invisible?
To make background transparent, set shape as None.
See the image below:
EDIT:
For Android Studio 3.0,
you can set it from Legacy Tab
I'm using Android Studio 3.0.1 and if the above answer doesn't work for you, try to change the icon type into Legacy and select Shape to None, the default one is Adaptive and Legacy.
Note: Some device has installed a launcher with automatically adding white background in icon, that's normal.
You have two ways:
1) In Background Layer > Scaling, reduce the Resize to 1
and then in Legacy > Legacy Icon set Shape as None
2) in Background Layer > Scaling > Source Asset, you can set an image as a 1x1 pixel (or any size) transparent.png image (you've already created).
and then in Legacy > Legacy Icon set Shape as None
the above approach didn't work for me on Android Studio 3.0. It still shows the background. I just made an empty background file
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
</vector>
This worked except the full bleed layers
This is just another workaround.
For the 'Foreground Layer', select 'Asset type' as text and delete the default text in the text field.
For the 'Background Layer', select 'Asset type' as image and now choose the path of the image you want as an icon.
And you are good to go.
Android Studio 3.5.3
It works with this configuration.
I Just put my view background (color code) as ClipArt or Image background, and it looks like transparent or no background where both have the same color as background.
These are the steps I took to make an image transparent:
1- I used an online website which makes the image transparent, there are a lot of them. For me, I use this https://www241.lunapic.com/editor/?action=transparent and sometimes this http://www.online-image-editor.com/help/transparency
2- In Android Studio (I'm using version 3.1.3), open Image Asset from app > res (right click) > New > Image Asset
3- In the Path, choose the location of the transparent image which you downloaded from the online website, and make the other options as shown, then Next, then Finish. The five different sizes of image mdpi(48×48), hdpi(72×72), xhdpi(96×96), xxhdpi(144×144), and xxxhdpi(192×192) will be created in the res/mipmap-density folders.
4- If you need sizes (dimensions) different from above, you can use this website http://nsimage.brosteins.com/ to upload your PNG image of biggest size that will be used in xxxhdpi. After uploading, you can download a zip file containing the five different sizes of image in the res/drawable-density folders.
First, create a launcher icon (Adaptive and Legacy) from Image Asset:
Select an image for background layer and resize it to 0% or 1% and
In legacy tab set shape to none.
Then, delete folder res/mipmap/ic_laucher_round in the project window and Open AndroidManifest.xml and remove attribute android:roundIcon="#mipmap/ic_launcher_round" from the application element.
In the end, delete ic_launcher.xml from mipmap-anydpi-v26.
Notice that: Some devices like Nexus 5X (Android 8.1) adding a white background automatically and can't do anything.
With "Asset Type" set to "Image", try setting the same image for the foreground and background layers, keeping the same "Resize" percentage.
I just added the icon as a normal icon: New -> Vector Asset
and then change the app icon in the Manifest file.
For Foreground Layer choose "Text" and then delete the content text
Finaly choose the path of the image you want as an icon.
enter image description here
Using android 3.0.1
I noticed this weird behavior(solution),
First: in background layer in the source_asset change the asset_type from image to color and than change it back to image.
second: enable trim in scaling and then resize it to a small percentage and it will work perfectly.
PS: If u didn't do the first step the scaling wont take affect.
and if anyone have an explanation for this please provide.
steps