ViewPager with Google Maps API v2: mysterious black view
I was able to stop the black surface being left behind after transition by placing another view with a transparent background on top of the ViewPager
inside a FrameLayout
:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v4.view.ViewPager
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</android.support.v4.view.ViewPager>
<!-- hack to fix ugly black artefact with maps v2 -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent" />
</FrameLayout>
Blank google map when using it inside multiple fragments on a viewpager
If you want to put a fragment into an other fragment, use getChildFragmentManager()
instead of getSupportFragmentManager()
getChildFragmentManager
Return a private FragmentManager for placing and managing Fragments
inside of this Fragment.
Related Topics
Android - Application (Apk) Maximum Size
Gradle Build Tool Cannot Find Play-Services-Tasks.Aar? Why
Android Eclipse Ddms - Can't Access Data/Data/ on Phone to Pull Files
Should Have Subtitle Controller Already Set Mediaplayer Error Android
How to Change the Textcolor on an Android Searchview
Adt 22.2 New App Wizard: Unsupported Template Dependency: Upgrade Your Android Eclipse Plugin
Android Gettext from Edittext Field
Disable/Check for Mock Location (Prevent Gps Spoofing)
How to Generate Class Diagram (Uml) on Android Studio (Intellij Idea)
Android: I Lost My Android Key Store, What Should I Do
How to Set Relativelayout Layout Params in Code Not in Xml
Force Overflow Menu in Actionbarsherlock
How to Call a Method in Another Activity from Activity
Using Getresources() in Non-Activity Class