Android : StreetView Fragment in SlidingUpPanel appears behind Map Fragment

on Wednesday, September 3, 2014


I am trying to create something similar to Google Maps in that I have a sliding panel that slides up over a MapFragment and I want to put a StreetView preview in the SlidingUpPanel like this.


Google Maps Screenshot


The problem is when I try to do this the StreetView Fragment in the SlidingUpPanel appears to slide behind the MapFragment whilst the SlidingUpPanel slides in front. I've read about similar things happening with the Navigation Drawer and a MapFragment but none of the workarounds such as putting in an invisible view over the map worked for this.


My App Screenshot


So as you can see the StreetView Fragment should go all way to the bottom of the slide menu but it's being covered by the MapFragment.


Below you can see the XML used for the SlidingUpPanel



<com.sothree.slidinguppanel.SlidingUpPanelLayout
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4"
android:gravity="bottom"
sothree:panelHeight="70dp"
sothree:fadeColor="#00FFFFFF">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.gms.maps.MapView
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>

<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/clicktext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="123 Hollywood"
android:textSize="24sp"
android:paddingLeft="10dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Confirmed"
android:textSize="14sp"
android:textColor="#888888"
android:paddingLeft="10dp" />



<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF"
android:orientation="horizontal"
android:id="@+id/streetview" />


</LinearLayout>

</com.sothree.slidinguppanel.SlidingUpPanelLayout>


Is this a problem with Google Maps or OpenGL or am I doing something wrong? Any insight would be much appreciated.


0 comments:

Post a Comment