navigation drawer google maps v2 , map blocking drawer

前端 未结 4 1038
走了就别回头了
走了就别回头了 2020-12-29 06:54

I have this problem when opening drawer on gingerbread and behind is google map v2. Map that should be on screen behind gets on top of everything.

Now I could bypas

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-29 07:44

    I have got the same problem here on ICS 4.0.4. The solutions mentioned in jfeinstein10's github post seems not working for me. But I have found a workaround, even it is not the best.

    When creating DrawerToggle object I override this event

    @Override
    public void onDrawerSlide(View drawerView, float slideOffset)
    {
         super.onDrawerSlide(drawerView, slideOffset);
         mDrawerLayout.bringChildToFront(drawerView);
         mDrawerLayout.requestLayout();
         mDrawerLayout.setScrimColor(Color.TRANSPARENT);
    
    }
    

    bringChildToFront and requestLayout method should overcome the drawer rendering problem while setScrimColor will get rid of the shadow. Too bad that I haven't found a workaround to render the shadow correctly as well. Hope this helps.

提交回复
热议问题