我在一家RelativeLayout
显示GoogleMap
,具有TextView
(除其他事项外)结束:Android的GoogleMap的重叠次数的onResume
<RelativeLayout
width=match_parent
height=match_parent>
<Map
width=match_parent
height=match_parent />
<TextView
with=100dp
height=100dp />
</RelativeLayout>
出于某种原因,如果我打回家,然后重新打开该应用程序时,地图将会覆盖(覆盖)TextView
。
我试图使用SupportMapFragment
和MapView
(与zOrderOnTop="false"
),但没有效果。 我也试图在onResume
/上显示/隐藏地图,没效果。
我也有Drawer
issue,但建议的修复只解决了Drawer
问题。
版本: com.google.android.gms:play-services:4.2.+
compileSdkVersion 19
minSdkVersion 14
targetSdkVersion 14
。
注意:此问题仅发生在Samsung Galaxy SII(4.0.4)上。 有什么想法?谢谢。
更新:我也试图从膨胀的代码,而不是XML的Fragment
,或使用GoogleMapOptions
设置zOrderOnTop(false)
,还是同样的结果...
更新2:我想我收窄问题:
工作:
drawer.xml
<Drawer>
<RelativeLayout
width=match_parent
height=match_parent>
<RelativeLayout
width=match_parent
height=match_parent>
<Map
width=match_parent
height=match_parent>
<View
width=match_parent
height=match_parent
background=transparent>
</RelativeLayout>
<TextView
width=100dp
height=100dp>
</RelativeLayout>
<ListView /> <!-- menu -->
</Drawer>
不工作:
drawer.xml
<Drawer>
<FrameLayout /> <!-- fragment container -->
<ListView /> <!-- menu -->
</Drawer>
map.xml
<RelativeLayout
width=match_parent
height=match_parent>
<RelativeLayout
width=match_parent
height=match_parent>
<Map
width=match_parent
height=match_parent>
<View
width=match_parent
height=match_parent
background=transparent>
</RelativeLayout>
<TextView
width=100dp
height=100dp>
</RelativeLayout>
一个解决办法是要在地图中drawer.xml声明,然后用setVisibility
显示/隐藏在需要的时候...有什么更好的建议?
谢谢,但我已经尝试过。它只修复抽屉问题,而不是主要问题...... – mbmc