question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MapView not redrawing when fragment gets replaced

See original GitHub issue

I’ve MapView in FragmentWithMap that is a part of ViewPager. When I replace FragmentWithViewPager that holds ViewPager with some other FragmentReplacer and return via PopBackstack my map does not get redrawn. Why is this happening?

I am triggering mapView.onPause() and mapView.onResume() in fragment lifecycle methods but it does not help. I’ve read that I should check if MapEngine is initialised and trigger onResume() only then but it did not help either.

What am I doing wrong?

I was looking for example of MapView being used in samples repository but all all of them includes MapFragment (which I would rather not use).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
starandcommented, Dec 14, 2018
0reactions
TostFcommented, Dec 17, 2018

I’m going to close the issue for now. Will re-open if new version isn’t going to fix the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to swap between map fragment and list ... - Stack Overflow
Currently I replace the FrameLayout by FragmentTransaction.replace with each Fragment, but this causes the other one to get destroyed, whereas I simply want...
Read more >
FragmentContainerView - Android Developers
Fragments using exit animations are drawn before all others for FragmentContainerView. This ensures that exiting Fragments do not appear on top of the...
Read more >
Fragement no longer exists for key android:target_state
I replaced getChildFragmentManager() with getFragmentManager() to get the activity's fragment manager and this seems to fix the issue. But now other problem ...
Read more >
Camera and view | Maps SDK for Android - Google Developers
The Maps API allows you to change which part of the world is visible on the map. This is achieved by changing the...
Read more >
Migrate to v10 | Maps SDK | Android - Mapbox docs
MAPBOX_STREETS by default if no style is provided. Users can load other styles if need. //mapView.getMapboxMap().loadStyleUri(Style.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found