white icons on background with API 21 - android

am building a app using material deaign but when I set api to >20 my status bar goes all white and non of the icons is seen. my question now is if I set my target sdk value to 20 will devices running lollipop be able to download my app from the playstore ?

Related

Do new Android versions support colorful notification icons? Since when?

I've been working with Android notifications and the notification icons are behaving differently on my two test devices (one with Android 9 and one with Android 11).
I set the notification icon to be the same as the app's launcher icon, like this:
notificationBuilder.setSmallIcon(R.mipmap.app_icon);
On Android 11, the icons in the notification bar show up exactly like the launcher icon, i.e., colorful (the first two icons are from apps developed by me):
On the other hand, Android 9 applies something like a boolean filter to the icons (here they are round because the launcher app on this phone applies an additional circle filter to the launcher icons):
After some research online, I only found information about how colors are not allowed in notification icons since Lollipop, and how what I am seeing on Android 9 is actually the expected behavior since then.
But what could explain the colorful icons showing up correctly on my Android 11? I assume that this may be a new feature from Android 10 or Android 11, but I couldn't find anything mentioning that in the documentation.
I would like to be sure of something like "colorful notifications icons are supported since SDK 30" (or maybe 29), so that I can set the icons depending on the device versions. More specifically, I would like to use the colorful icons on devices that support that, while using different single-color icons on devices that don't. But unfortunately I don't know for sure which devices/Android versions support it.
Thanks in advance.

status bar notification icon color

I'm working with android application to publish Google play store. as I know the lollipop and above versions of android support only white colord icons. when I use a multicolour icon with the inbuilt emulator of android studio, it shows white . but when I use that apk in a Samsung, huawei, asus or htc device it shows multicolour status bar icon correctly. my problem is why it is happening and how can I filter multicolour icon working devices and not working devices?
link to some example screenshots added in the first comment.
link to the screenshot of oreo device with multicolor icon not showing correctly
link to the screenshot of another oreo device with multicolor icon showing correctly

App icon size on Android 8.0 if targetSdkVersion >= 26

My app has a square icon. When targetSdkVersion < 26 the app icon is shown correctly on all devices. But with targetSdkVersion >= 26 the app icon is shown inside a white circle on Android 8.0 devices.
Is there a way to remove the white circle?
Per the Understanding Android Adaptive Icons blog post:
Indeed Google’s launcher will start placing icons of apps which target Android-O but do not supply an adaptive icon onto a background (scaling down their non-adaptive icon).
You must add an adaptive icon to your app once you target API 26. As adaptive icons change their outer shape based on what device they are running on, you cannot rely on your launcher icon always being a square.
The Designing Adaptive Icons blog post and Implementing Adaptive Icons blog post goes through more details on how you might take advantage of adaptive icon's separate background and foreground layers and how to implement an adaptive icon in your app. Android Studio also contains tooling to help via the New > Image Asset wizard as described in the Create app icons with Image Asset Studio article.

How not to use the adaptive icon feature for my app in Android?

I have 2 games that I created, both compiled for Android.
I run both games on an Oreo device, but for some reason one shows the original icon and one shows the icon inside a white rectangle.
I am trying to find out how Android decides whether to show the original icon or the icon inside the white border as part of the adaptive icons feature.
Target API version? icon with alpha channel?
Managed to figure out how this works, so posting here for others that encounter the same problem.
Android uses the targetSdkVersion to select if the adaptive icons feature is used. If the targetSdkVersion is 26 and above, it will add the white border around the icon, if 25 or lower is used, it will not.
I guess what Android is doing is treating the icon image as the foreground element of the adaptive icon and using white as the background element.
The real solution here should be to support adaptive icons of course, but as a quick solution, I just changed my targetSdkVersion to 25 for now.

Progress Bar Theme Style Android

i'm confused about deploying my android apps, theming isue.
How can i display on diferent devices a progress bar(for example) with his native theme? So if its android 4.0 display it with themes for 4.0 and if its android 2.2 display it with themes for 2.2...beause if i develop for android 2.2, i get his theme on other devices versions.
i get this always
I want this for other versions.
EDIT
If the device has version 2.2 i want that progress bar as a 2.2 progress bar android version. But if it's a 4.0 version i want a 4.0 progress bar style verion. Is that possible?
The effect below is one of features of theme Holo, which is introduced into android since 4.0. So there is possibility you can get such layout effect by introducing style file into lower version of system. See set-holo-theme-in-older-android-versions

Categories

Resources