1
CollapseingToolbarLayout에 Google지도가 있습니다. 지도 카메라가 제대로 작동하지 않지만지도가 완벽하게 표시됩니다.CollapsingToolbarLayout에서 Android지도가 제대로 스크롤되지 않습니다.
다른 위치로 이동하기 위해지도를 스 와이프하려고하면 애니메이션이 부드럽 지 않으며 일반적으로 CoordinatorLayout이지도를 재정의하기 때문에지도를 스 와이프하여 등록하지 않습니다.
예를 들어지도를 위로 스 와이프하려고하면지도가 스크롤되지 않습니다. CoordinatorLayout이 대신 스크롤됩니다 (NestedScrollView는 Map 변경 위치 대신 위로 이동합니다).
누구든지이 문제를 해결하는 방법을 알고 있습니까?
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/background_light"
android:fitsSystemWindows="true"
android:id="@+id/coordlayout"
>
<android.support.design.widget.AppBarLayout
android:id="@+id/main.appbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="80dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
android:fitsSystemWindows="true"
>
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorPrimary"
app:titleEnabled="true"
app:expandedTitleMarginStart="48dp"
app:expandedTitleMarginEnd="64dp"
>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_collapseMode="parallax"
app:layout_scrollFlags="scroll|enterAlways"
android:fitsSystemWindows="true"/>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:padding="20dp"
android:background="@color/colorPrimary">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/linearLayout">
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<android.support.design.widget.FloatingActionButton
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_margin="@dimen/activity_horizontal_margin"
android:src="@drawable/dots"
app:backgroundTint="#4fcd1e"
app:layout_anchor="@id/main.appbar"
app:layout_anchorGravity="bottom|right|end"
android:id="@+id/fab" />
</android.support.design.widget.CoordinatorLayout>