1

Google에서 바닥 시트가있는 Google지도를 구현했습니다. 그러나 레이아웃을 확인할 때지도가 화면 상단에 있으며 화면의 너비와 높이가 모두 차지하지 않습니다. 이 문제를 해결하기 위해 여러 가지 방법을 시도했지만 행운은 없습니다.중첩 스크롤 높이보기 문제

<?xml version="1.0" encoding="utf-8"?> 

<LinearLayout android:layout_height="match_parent" 
android:layout_width="match_parent" 
android:orientation="vertical" 
xmlns:android="http://schemas.android.com/apk/res/android" > 

<android.support.design.widget.CoordinatorLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:layout_weight="1"> 

    <android.support.v4.widget.NestedScrollView 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_weight="1" 
     android:layout_gravity="fill_vertical" 
     app:layout_behavior="@string/appbar_scrolling_view_behavior" 
     > 
     <RelativeLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_gravity="fill_vertical" 
      > 
      <fragment xmlns:android="http://schemas.android.com/apk/res/android" 
       xmlns:map="http://schemas.android.com/apk/res-auto" 
       xmlns:tools="http://schemas.android.com/tools" 
       android:id="@+id/map" 
       android:layout_gravity="fill_vertical" 
       android:name="com.google.android.gms.maps.SupportMapFragment" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       tools:context="com.app.headcount.MapsActivity" 
       /> 
     </RelativeLayout> 
    </android.support.v4.widget.NestedScrollView> 


    <include layout="@layout/test" 
     android:id="@+id/design_bottom_sheet"/> 



</android.support.design.widget.CoordinatorLayout> 



</LinearLayout> 

당신이 한 번 봐 가지고 문제를 정확히를 어디 알려 주시기 바랍니다 수 : 아래

enter image description here

enter image description here

레이아웃 코드? 감사합니다. .

+0

당신이 전체 화면에지도를 보여주고 싶은, 그러나 동일한 작업을 수행 할 수 없습니다. 이것이 당신의 질문입니까? –

+0

@Vyshaks, android : layout_weight = "1"매개 변수와 android : layout_height = "match_parent"를 사용하고 있습니다. 0dp로 높이를 설정하십시오. 그러면 안드로이드가 제대로 무게를 계산할 수 있습니다. – Rafal

+0

지도 조각이 스크롤보기 안에있는 이유는 무엇입니까? –

답변

4

는 사용하려고 안드로이드 : fillViewport = "true"를