galadril/Xam.Shell.Badge

Xamarin Android After add badge count tab selection color not showing for tab icon.

Closed this issue ยท 22 comments

Please check below image when i select tab for implemented badge count then selection color for tab-icon is not showing.

Screenshot 2020-12-21 at 1 21 27 PM

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.94. Please mark this comment with ๐Ÿ‘ or ๐Ÿ‘Ž to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

I can confirm this issue.

This is checked against v1.0.10?

Yes.

Yes.

On 1.0.11 same issue

On 1.0.11 same issue

but 1.0.11 is not available right now

On 1.0.11 same issue

but 1.0.11 is not available right now

In Visual Studio latest version available is 1.0.11

On 1.0.11 same issue

but 1.0.11 is not available right now

In Visual Studio latest version available is 1.0.11

Same issue in 1.0.11

any update?

any update?

Not Yet...Please resolved issue

Really busy at the moment, please create a PR if you find the fix

any update?

Not Yet...Please resolved issue

can you create a PR?

any update?

Not Yet...Please resolved issue

can you create a PR?

I'm currently busy with other task.

any update?

Not Yet...Please resolved issue

can you create a PR?

I'm currently busy with other task.

ups... and they don't get the official one in shell or tabview either ...

Any news on this?

In 1.0.11 the selected tab has icon color different from the tab title color. While in 1.0.8 this was working...

since this no longer holds, the solution is to use shell + tabview or https://www.sharpnado.com/pure-xamarin-forms-tabs/

pp111 commented

It seems that the image color was lost when it was removed and added to the view again
I fixed this issue by just removing in BadgeHelper.cs the lines
bottomNavigationView.RemoveView(imageView);
and
badgeContainerFrameLayout.AddView(imageView)

for the functions ApplyBadge and ApplyTinyBadge.

It seems to work correctly now, however I don't know if these lines had another purpose.

Law85 commented

@pp111 I think this was done so that the image can be placed inside of the BadgeContainer to ensure its was positioned within its parent correctly. When I removed these lines it resulted in fixing the issue but the badges weren't quite right. I have tweaked around with the layout options a little and I think I have managed to fix it.

@galadril. I have created a PR for this issue, please let me know you see any issues

@rayita @angelru, this may not be recent for you anymore, but i've introduced new logic for rendering badges on Android with the following PR: #24. If you're still interested, you may check it out.

@rayita, @angelru, try the new v.1.0.13 of the Nuget package. If you still experience problem, feel free to create new issue.