Navigationdrawer MapFragment和CameraView下(Surfaceview) [英] Navigationdrawer under MapFragment and CameraView (Surfaceview)

查看:95
本文介绍了Navigationdrawer MapFragment和CameraView下(Surfaceview)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与谷歌地图片段的错误。片段放在我的活动内,当我打开抽屉式导航栏则显示在地图片段后面。这是奇怪,因为导航抽屉布局中的片段的顶部。

I have a bug with the google maps fragment. The fragment is placed inside my activity and when i open the navigation drawer it is displayed behind the maps fragment. that's strange because the navigation drawer is on top of the fragment in the layout.

同样的问题与CameraView。

Same problem with the CameraView.

在Android 2.3及检测到的问题有些

problem detected on android 2.3 and some

推荐答案

原因:CameraView和MapFragment是SurfaceViews

Reason: The CameraView and the MapFragment are SurfaceViews.

解决方案:

    <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">
        <FrameLayout
                android:id="@+id/palce_map_here"
                android:layout_height="match_parent"
                android:layout_width="match_parent"/>
        <FrameLayout
                android:id="@+id/bugfixview"
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:background="@android:color/transparent"/>
    </RelativeLayout>

画一个透明的视图上表面观之上。

draw a transparent view on top of the surface view.

这篇关于Navigationdrawer MapFragment和CameraView下(Surfaceview)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆