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

Prevented SearchBar error when navigationImage missing from NavigationBar (Android) #710

Merged
merged 3 commits into from
Jul 1, 2023

Conversation

grahammendick
Copy link
Owner

The Material3 SearchBar throws when the navigation icon is null. Used the default navigation icon if the user doesn't provide one. Disabled the navigation icon animation if not using the default otherwise Android shows the default icon when transitioning between the toolbar and results.

Setting the navigation icon to null throws an error. The default is the search icon so makes sense to use it
The animation displays the search icon when transitioning from toolbar to results. Safer to turn it off if using a custom icon
Set navigation icon to home.png then open and closed the search, then removed the navigation icon and opened search again - the home icon was still shown when animating between toolbar and results. So simplified code by setting the animation just when attached to window. It doesn't fix the bug but no point updating each animation when it doesn't work
@grahammendick grahammendick merged commit 92c9266 into master Jul 1, 2023
@grahammendick grahammendick deleted the missing-navicon branch July 1, 2023 14:30
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.

1 participant