Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blank screen on SlidingMenu when using with Fragment (GMap)

So i use SlidingMenu library with a FragmentActivity in my app.

There is a GoogleMap in the layout and a menu on the left side with some content. When i pull the menu to see it, there is a big black rectangle there, covering my sliding menu content. After i click it once, it is disapearing.

Can anybody has something to say about this? A simple map.enter image description here

like image 961
Adam Varhegyi Avatar asked Nov 03 '22 20:11

Adam Varhegyi


2 Answers

I had the same issue on android 2.3.7 but not in 3.x or later versions. After rotating the view the menu renders fine after.

I found a solution using a custom TransparentSupportMapFragment from: Android MapView With Sliding Menu Obscures Menu

like image 179
user1976945 Avatar answered Nov 11 '22 19:11

user1976945


Fragment Black screen issue

<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>
like image 36
chavanNil Avatar answered Nov 11 '22 19:11

chavanNil