1
을 채우지 나는 다음과 같은 레이아웃이 있습니다는 SupportMapFragment을 만들려면 화면 높이
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
class="com.google.android.gms.maps.SupportMapFragment" />
<TextView
android:text="Teste"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout >
를 그리고지도가 거의 전체 화면 크기와 텍스트보기는 쇼가 절반입니다 보여입니다.
지도에서 화면의 여유 공간 만 채우려면 어떻게해야합니까? 다른 사람들이보기에 충분한 공간을 확보하고 있습니까?
정말 고마워요! – jonathanrz
그것은 나를 위해 작동하지 않았다, 내가 포함하는 레이아웃은 상위 뷰를 고수해야한다 : 맵은 실제로 null 높이를 갖는다. [3 뷰, 맨 위, 중간에 맵 조각, 하단에 포함 된 레이아웃] – Poutrathor
나는 보냈다. 너무 오래이 대답을 찾기 전에 이것을 알아 내려고 노력했습니다. 이것은 완벽하게 작동했습니다! – Aaron