Wednesday, 21 August 2013

Maps V2 with viewPager

Maps V2 with viewPager

I'm currently developing for Android 4.3.
Background:
I'm using pageViewer to scroll between three different fragments. My
second fragment (tab 2) has XML with SupportMapFragment and other content.
as shown below :

My Attempt:
While searching the web I noticed that for SupportMapFragment I need
FragmentActivity which doesn't apply for FragmentPagerAdapter. I need the
user to have the ability to control the map as well as control the rest of
the content in the fragment.
My Question:
How can I use the SupportMapFragment with the viewPager while having more
content in the Fragment?
More about my code: in the getItem inside FragmentPagerAdapter I'm
returning Singleton Fragments (each Fragment has a class) therefore I
couldn't find any solution over the Internet since my class can't extend
SupportMapFragment because it has more data.

No comments:

Post a Comment