3

My test device is Android 6.0. It uses round icons for all of the apps (except mine). As this is the only test device and my phone doesn't use round icons, I have to make it work on the test device.

I'm trying to make it show a round icon and so far I had no success.

I've set all the ic_launcher_round pics in different resolutions. I've also created an "app_icon_round" pic for "ic_launcher_round.xml" file. All of the ic_launcher_round pics are appropriate size etc... I've checked it multiple times.

ic_launcher_round.xml:

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

AndroidManifest.xml,:

<application
    ...
    android:icon="@mipmap/ic_launcher"
    android:roundIcon="@mipmap/ic_launcher_round"
    ...
</application>

I always install it using Android Studio. I noticed when I was working on the splash-screen, that I needed to uninstall the app manually, restart the phone, and then install it via Android Studio to notice changes.

I think I'm missing something minor but don't know what it is. The answers on the internet I saw didn't mention something that I didn't do.

Dr Mido
  • 2,414
  • 4
  • 32
  • 72
Invader Zim
  • 796
  • 2
  • 14
  • 39
  • 1
    **FYI** [Android 8.0 (API level 26) introduces adaptive launcher icons](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive) **and** [You should make sure to test your app on devices that support the new circular icons, to see how your circular app icons look and how they are displayed. One way to test your resources is to run the Android emulator and use a Google APIs Emulator System targeting API level 25](https://developer.android.com/about/versions/nougat/android-7.1#circular-icons) – AskNilesh Apr 10 '19 at 12:12
  • 1
    Have look [this](https://stackoverflow.com/a/46823168/5110595) – Hemant Parmar Apr 10 '19 at 12:14
  • @HemantParmar hmmmm ok, but how does this test phone uses round icons? I would like for it to work on all versions it supports (API lvl 22+ if i'm not mistaken). Ill test it with 8.0+ if I manage to find some device that uses it. – Invader Zim Apr 10 '19 at 12:15

1 Answers1

6

An Android 6.0 device will show your @mipmap/ic_launcher icon. If you want your launcher icon to be round on Android 6.0, make @mipmap/ic_launcher be round.

android:roundIcon is used only on Android 7.1, and adaptive icons are used only on Android 8.0+.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks, Ill accept the answer when the time-limit passes. Basically I can put the round icon for default icon, but I don't like that, because then it would always be round. In my humble opinion, if I have to choose between support for older or newer versions, I'll choose newer versions. – Invader Zim Apr 10 '19 at 12:20
  • 2
    @InvaderZim: "but I don't like that, because then it would always be round" -- there is nothing stopping you from having different versions of `@mipmap/ic_launcher` for different Android versions. – CommonsWare Apr 10 '19 at 12:22
  • Oh I didn't know that, thank you very much, that solves all my problems :D – Invader Zim Apr 10 '19 at 12:33