Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix badge trimming of second icon #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

irfaan008
Copy link

When you add 4 icons in bottom navigation and set badges on second icon (which is left to center icon), the badge text gets trim due to the padding assigned to center button. This update fixes that issue.
This update also adds another screen on sample project to demonstrate how badge can be assigned to the icons.
Irrespective of interest Gradle has been updated as well to version 4.1 to make the compilation successful.

Please merge to main repository and update the dependency version.

@FireZenk
Copy link
Contributor

I've tried your solution, but in this case, is not working as expected:
device-2018-03-21-173259

@irfaan008
Copy link
Author

Yes, proceeding this way distorts the shape of center button shadow. This is beneficial if one is not using that shadow.

On investigating the code of main repository I identified that the width of second and third element (message and search) in above screenshot has been calculated with the assumption that center button doesn't have any left , right margin/padding. This is why when we show the badge to 2nd menu item. It gets trimmed on rendering.

@FireZenk
Copy link
Contributor

Fixed here: #79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants