I want to enclose the map within a Fragment. I tried with 2 approaches.
- Enclosing map within fragment using Tabhost. But this uses LocalActivityManager which is a deprecated method. I wanted to use without this method, but unable to proceed.
It is throwing IllegalException when I try to call mTabHost.setup(); for setting up my tabs.
- Directly using Fragment and FragmentActivity : Referred here . But unable to use methods to fetch the Current User Location.
Kindly let me know how to go about it.
A
MapActivitycan load aFragmentthat contains aMapView, on API Level 11 and higher — see this sample project for an example of how this is done.However, this does not work with the fragment backport in the Android Support package. There is no good way to handle that, unfortunately, at this time.