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

attach now accepts a nullable View as it internally is used safely #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

c-b-h
Copy link
Contributor

@c-b-h c-b-h commented Dec 20, 2019

The mapView is treated as Nullable throughout MapMeAdapter but when attaching, only a NonNull View is accepted. Even as SupportMapFragment is inflated in a parent's onCreateView, upon configuration changes onMapReady might be called before onCreateView of the parent so if the attaching is done in onMapReady the only possible valid View to pass is the one fetched by requireView() but that View has yet not been created and an IllegalException will be thrown.

Instead if getView() that is Nullable would be allowed, things would work out.

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.

None yet

1 participant