The following XML allows both a Streetside view and a map to be displayed on one of the pages of my ViewPager...
<LinearLayout
android:id="@+id/map_container2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:orientation="vertical">
<fragment
android:id="@+id/streetviewpanorama"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
class="com.google.android.gms.maps.SupportStreetViewPanoramaFragment" />
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.5"
class="com.google.android.gms.maps.SupportMapFragment"
map:cameraTargetLat="-33.87365"
map:cameraTargetLng="151.20689"
map:cameraZoom="15" />
</LinearLayout>
This works ok but I want to provide a "sliding" capability so the the user can put his finger on the line between the two maps and, for instance, slide the dividing line up to show less streetview and more map. Or the reverse.
If no street view is available at the given coords then I would want to programatically make the street view fragment gone which I realize I can do with the existing layout.
EDIT: BTW the SlidingPanelLayout won't do the job because it has trouble with other gestures available on the map.
Is there a widget that will do this? Thanks, Dean