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 null on .show() android #30

Merged
merged 1 commit into from
Oct 15, 2016
Merged

Fix null on .show() android #30

merged 1 commit into from
Oct 15, 2016

Conversation

bradmartin
Copy link
Contributor

  • FrameLayout constructor fixed with context not activity.
  • getParent() returns null, the android prop on the currentPage is enough for addView() on the ViewGroup

These changes work locally, still working on a minor issue with the map not rendering until the device screen goes to sleep and then when I wake the screen the map shows and the .show().then() executes.

- FrameLayout constructor fixed with context not activity.
- getParent() returns null, the `android` prop on the `currentPage` is enough for *addView()* on the *ViewGroup*

These changes work locally, still working on a minor issue with the map not rendering until the device screen goes to sleep and then when I wake the screen the map shows and the `.show().then()` executes.
@bradmartin
Copy link
Contributor Author

Wrapping the mapbox.show() in a timeout resolves the issue of it not initally rendering on Android (tested Droid Turbo 2 on 6.0).

@EddyVerbruggen
Copy link
Collaborator

Are you perhaps using Mapbox before application.start? If so then that's a common thing I encounter and mostly fix that with a listener in other plugins (I see it's not in this one).

@bradmartin
Copy link
Contributor Author

bradmartin commented Sep 2, 2016

Nope, navigating to a page in the app. Called in the loaded event on the page.

@EddyVerbruggen
Copy link
Collaborator

Weird.. that would be so much easier when it's defined in XML ;)

@diego086 diego086 mentioned this pull request Sep 21, 2016
@EddyVerbruggen EddyVerbruggen merged commit bf9a97b into Yermo:master Oct 15, 2016
EddyVerbruggen added a commit that referenced this pull request Apr 18, 2017
Fix null on .show() android
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