我有简单的布局结构:的Android MapView的重叠DrawerLayout
DrawerLayout
\-- FrameLayout // @+id/fragment_container
\-- ListView // @+id/drawer_list
点击我插入任何抽屉项目/经由FragmentTransaction.replace()
与相应片段实例替换片段插入到R.id.fragment_container
。其中一个碎片包含MapView
。
它在不同设备上呈现问题,但同时DDMS显示我正确的截图。
EDITED
问题出现在这种装置:
- 华为U9508,机器人4.0.4(API 15)
- HTC欲望A9191,机器人2.3.5( API 10)
有no issue
在此类设备上:
- 三星Galaxy S2用的CyanogenMod 4.2.2的Android(API 17)
- LG谷歌Nexus 4的Android 4.3(API 18)
可能有人帮助我了解并解决这个问题?
参见图片:
华为U9508,机器人4.0.4(API 15)
HTC欲望A9191,机器人2.3.5(API 10 )
个DDMS
EDITED
活动布局:
<?xml version="1.0" encoding="utf-8"?>
<DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<!-- The main content view -->
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<!-- The navigation drawer -->
<ListView
android:id="@+id/drawer_list"
android:layout_width="240dp"
android:layout_height="match_parent"
android:orientation="vertical"
/>
</DrawerLayout>
片段布局:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<!-- other views here -->
<com.google.android.gms.maps.MapView
android:id="@+id/consumer_profile_map"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</RelativeLayout>
MapView的是贪婪 –
你是什么意思?如何避免这一点? –
Sry for OT,但你来自纽伦堡吗? –