In my app there are two tabs, one tab include map and other one shows map. When I am switching the tab, map screen becomes black for a second until maps doesnt load and then shows the map.I have checked solutions on stackoverflow but doent help in my case.Please suggest.
mainlayout.xml
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="61dp">
</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>
<com.agile.pbc.common.NonSwipeableViewPager
android:id="@+id/bottomPager"
android:layout_width="match_parent"
android:layout_height="62dp"
android:layout_gravity="bottom|center_vertical"
android:background="@android:color/transparent" >
</com.agile.pbc.common.NonSwipeableViewPager>
<com.agile.pbc.common.ViewPagerOutline
android:layout_width="match_parent"
android:layout_height="62dp"
android:layout_gravity="bottom|center_vertical"/>
</FrameLayout>
maplayout.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
tools:context=".LocatorMainActivity$DummySectionFragment" >
<fragment
android:id="@+id/map"
class="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="fill_parent"
android:layout_height="match_parent" />
</RelativeLayout>