Android Question Notification bar icons

obscure

Member
Licensed User
Longtime User
As the topic says I've a question regarding the notification bar icons.
On one of my devices those look like this:
f4cd318f21.jpg


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!
f4df1372cb.jpg


Is there a way to deliver two icons? How did they do this?

Thanks!
 

DonManfred

Expert
Licensed User
Longtime User
How did they do this?
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

Member
Licensed User
Longtime User
Hi Don Manfred!

The problem is that the system doesn't check if the icon consists of a white shape only.
ffdfa230ea.jpg


See the icon saying 'b4a'?

ffea6a76ce.jpg


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

obscure

Member
Licensed User
Longtime User
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

obscure

Member
Licensed User
Longtime User
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
Top