innomotion media
innomotion media

Reputation: 922

Remove white container around android launcher icons

As you can see in my screenshot, my app (Q2go) has a white border around the launcher icon. But if I look at "Maps" for instance, the border is removed and the whole icon is showing.

enter image description here

I looked through many discussions, but none of them work for me since I am using neither android studio nor Xamarin.Android. This is a Xamarin.Forms application and therefore there is no image editor for android available (only for iOS for some reason) ... or maybe I just haven't found it?

Anyway, I remember from many years ago, that there was a way to force the icon being rendered without its container (which deviates on different platforms. Above Droid 9 it is inside a rounded rectangle, not a circle anymore...)

Anyway: How can I remove the white border on the background?

[Activity(Label = "Q2go", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]

Upvotes: 3

Views: 2928

Answers (2)

T77
T77

Reputation: 490

Here the white frame/container/border appears only when using different icon shapes (square, for example). Using default icon shape (which is circle), no white frame at apps launch icons.

See this comment: https://support.google.com/pixelphone/thread/9664943?hl=en&msgid=10108242

Android launch icon with white frame only when icon shape not-circle

Upvotes: 0

innomotion media
innomotion media

Reputation: 922

And this is how you do it:

Add folder in Resources called: "mipmap-anydpi-v26" and add two xmls called: icon.xml and icon_round.xml.

Contents:

icon.xml:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/launcher_background" />
    <foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

icon_round.xml:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/launcher_background" />
    <foreground android:drawable="@mipmap/launcher_foreground" />
</adaptive-icon>

Now add another folder under resources and call it "mipmap-xxxhdpi" and add two images (both your logo, both in cirlce and name them 1.) icon.png and 2.) launcher_foreground.png.

Last: copy my main activity atributes and BOOM it looks fine now.

and BOOM

Upvotes: 3

Related Questions