カスタム ビューを作成し、これを LinearLayout に配置しました。
問題は、レイアウトの高さを完全に埋めることができないことです。カスタム ビューのサイズは常に正方形で、幅 = 高さです。
これが私のレイアウトです:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:layout_weight="0">
<it.inav.graphics.MapView
android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"/>
</LinearLayout>
それが機能しているように見える唯一の方法は、RelativeLayout を使用し、両方を使用してビューを「強化」することです
android:layout_alignParentBottom="true"
android:layout_alignParentTop="true"
それでも、サイズの高さを取得しようとすると、以前と同じ長さが返されます。