私は単純なレイアウト構造を持っています:
DrawerLayout
\-- FrameLayout // @+id/fragment_container
\-- ListView // @+id/drawer_list
ドロワー項目をクリックすることで、対応する Fragment インスタンスを介しFragmentTransaction.replace()
てフラグメントを挿入/置換します。R.id.fragment_container
これらのフラグメントの 1 つに が含まれていますMapView
。
また、さまざまなデバイスでレンダリングの問題がありますが、同時に DDMS は正しいスクリーンショットを表示します。
編集済み
次のようなデバイスで問題が発生します。
- ファーウェイ U9508、アンドロイド 4.0.4 (API 15)
- HTC 欲望 A9191、アンドロイド 2.3.5 (API 10)
そのようなデバイスにはありno issue
ます:
- CyanogenMod Android 4.2.2 (API 17) を搭載したSamsung Galaxy S2
- LG Google ネクサス 4 Android 4.3 (API 18)
この問題を理解して修正するのを手伝ってくれる人はいますか?
画像を参照してください:
ファーウェイ U9508、アンドロイド 4.0.4 (API 15)
HTC 欲望 A9191、アンドロイド 2.3.5 (API 10)
DDMS
編集済み
活動のレイアウト:
<?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>