Reputation: 20442
I would like to show a Google Maps as one of my 3 pages in a ViewPager.
I was thinking to use Views instead of Fragments inside my ViewPager, but I have only found examples with Google Maps V2 being a fragment. So, I guess I will have to make each ViewPager page a fragment.
Can you confirm that Google Maps V2 can only be a fragment?
Upvotes: 0
Views: 116
Reputation: 13223
I was thinking to use Views instead of Fragments inside my ViewPager
ViewPager
most commonly uses Fragments
via FragmentStatePagerAdapter
or FragmentPagerAdapter
. By using Fragments
you can supply and manage the lifecycle of each page.
Can you confirm that Google Maps V2 can only be a fragment?
This is not necessarily the case. You can use a MapView
.
Upvotes: 3