Why does my launcher icon look different? - android

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.

Related

What "Icon Type" should I choose for normal images to be used in an Android app? How should I add these as ImageViews?

I want the images to be as they are, without any changes. I'm trying to add some images provided by Android Studio by default (Asset Type: Clip Art).
The images will be used as ImageViews in the app's main screen and nowhere else. It won't be used for any notifications, as the app's (launcher) icon or as Action Bar/Tab icons. What "Icon Type" should I choose for normal images to be used in an Android smartphone (not an Android TV) app's activity?
Is this the best way to create images for an app? Also, when I'm adding these images as ImageViews, should I choose the one from the Drawable or Mip Map tab?
Drawable:
Mip Map:
I guess this answer says it's Drawable as Mip Map is only for launcher icons. But, which one do I choose if it's the Drawable tab that I have to choose from? What if I want the image with both its background and foreground? I actually wouldn't care choosing the wrong option if the image looks as is.
TO get images from clip art to be used in your app go to drawable>vector asset> select your clickart> click on finish.
The better way however is to go online and download .svg files for icons and then select local svg option in your vector asset creator to use it in your app.

Launcher Icons (Legacy only) showing white background icon android studio 3.3

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.

How to change the ic_launcher_round.png folder content?

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"

Problems while importing an image asset

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

Android Studio doesn't recognize 9patch generated images

I generated 9patch images from Simple 9 patch generator available free on the internet for the splash screen. When I write android:background="#drawable/splash.9", it doesn't recognize the image.
Plus , when I select Android from the drop down menu on left top side , I don't see the images I put in different drawable folders.
No need to add the .9 suffix. It's just there to tell the build environment that this is a 9patch. Link to documentation.
android:background="#drawable/splash"
should be enough

Categories

Resources