obscure Member Licensed User Longtime User Nov 30, 2016 #1 As the topic says I've a question regarding the notification bar icons. On one of my devices those look like this: It seems it's just plain white shapes on a white background. If I drag down the notification bar to actually read the notifications the icons are inside a gray circle suddenly! Is there a way to deliver two icons? How did they do this? Thanks!
As the topic says I've a question regarding the notification bar icons. On one of my devices those look like this: It seems it's just plain white shapes on a white background. If I drag down the notification bar to actually read the notifications the icons are inside a gray circle suddenly! Is there a way to deliver two icons? How did they do this? Thanks!
DonManfred Expert Licensed User Longtime User Dec 1, 2016 #2 obscure said: How did they do this? Click to expand... I dont see two different icons. It´s the same icon. The Notification has a white background... White ion on white background does not look good. So the icon is inside a round shape in the notification. But it is not a different Icon. Upvote 0
obscure said: How did they do this? Click to expand... I dont see two different icons. It´s the same icon. The Notification has a white background... White ion on white background does not look good. So the icon is inside a round shape in the notification. But it is not a different Icon.
Erel B4X founder Staff member Licensed User Longtime User Dec 1, 2016 #3 You can add a LargeIcon with the NotificationBuilder library: https://www.b4x.com/android/forum/threads/notification-builder-library.27376/#content Upvote 0
You can add a LargeIcon with the NotificationBuilder library: https://www.b4x.com/android/forum/threads/notification-builder-library.27376/#content
obscure Member Licensed User Longtime User Dec 1, 2016 #4 Hi Don Manfred! The problem is that the system doesn't check if the icon consists of a white shape only. See the icon saying 'b4a'? Unfortunately LargeIcon doesn't seem to do what I want Erel as it keeps the small icon and moves it to the right of the notification. If you take a look at the screenshots in my first post once more you can see there is just the icon on the left. (Beside that I think 'SMS Composer' was made before NotificationBuilder was available.) There must be another way! Upvote 0
Hi Don Manfred! The problem is that the system doesn't check if the icon consists of a white shape only. See the icon saying 'b4a'? Unfortunately LargeIcon doesn't seem to do what I want Erel as it keeps the small icon and moves it to the right of the notification. If you take a look at the screenshots in my first post once more you can see there is just the icon on the left. (Beside that I think 'SMS Composer' was made before NotificationBuilder was available.) There must be another way!
I inakigarm Well-Known Member Licensed User Longtime User Dec 1, 2016 #5 I think it's a Google Design decision: https://developer.android.com/about/versions/android-5.0-changes.html Upvote 0
I think it's a Google Design decision: https://developer.android.com/about/versions/android-5.0-changes.html
obscure Member Licensed User Longtime User Dec 3, 2016 #6 Hey inakigarm. Thanks for the link! If I've this right, we should use 'setColor' to set the accent color. How do we do this from b4a? Upvote 0
Hey inakigarm. Thanks for the link! If I've this right, we should use 'setColor' to set the accent color. How do we do this from b4a?
Erel B4X founder Staff member Licensed User Longtime User Dec 4, 2016 #7 This is how the notifications look in Android 7: What is the value of targetSdkVersion in your app? Upvote 0
obscure Member Licensed User Longtime User Dec 4, 2016 #8 Hi Erel! I was targeting API 18. If I switch to 21 any opaque area inside the icons gets replaced by white and the gray circle is there too. So this seems to do it! What I still don't understand is this: The 'SMS Composer' application, to be seen in my very first post was last updated 2011 - about 3 years away from API 21 - must be API 12 or so. Why on earth does Android transform the icon to white-only and adds the gray circle if it doesn't do it if I'm targeting API 18? Upvote 0
Hi Erel! I was targeting API 18. If I switch to 21 any opaque area inside the icons gets replaced by white and the gray circle is there too. So this seems to do it! What I still don't understand is this: The 'SMS Composer' application, to be seen in my very first post was last updated 2011 - about 3 years away from API 21 - must be API 12 or so. Why on earth does Android transform the icon to white-only and adds the gray circle if it doesn't do it if I'm targeting API 18?
Erel B4X founder Staff member Licensed User Longtime User Dec 4, 2016 #9 obscure said: Why on earth does Android transform the icon to white-only and adds the gray circle if it doesn't do it if I'm targeting API 18? Click to expand... I'm not sure. Upvote 0
obscure said: Why on earth does Android transform the icon to white-only and adds the gray circle if it doesn't do it if I'm targeting API 18? Click to expand... I'm not sure.