MapView not redrawing when fragment gets replaced
See original GitHub issueI’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:
- Created 5 years ago
- Comments:5
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@TostF, please see this sample app https://github.com/heremaps/here-android-sdk-examples/tree/master/route-tta
I’m going to close the issue for now. Will re-open if new version isn’t going to fix the issue.