这个地图位于一个折叠式工具栏布局(collapsingToolbarLayout)中,而该布局是嵌套在一个应用栏布局(appBarLayout)中的。 在android设计支持库22.2.0和22.2.1版本中,我可以独立于协调布局(coordinatorLayout)在地图周围平移,但在23.0.1版本中,如果我尝试在地图的南/北轴上平移,它会导致可滚动视图(recyclerview)上下滚动。这是一个bug还是有一种将触摸事件从appBarLayout传递给mapFragment的方法?
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways">
<fragment
android:id="@+id/mapFragment"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_collapseMode="parallax" />
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#44CCFF"
app:behavior_overlapTop="184dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="16dp"
android:src="@drawable/ic_list_white_24dp"
app:backgroundTint="#3366FF"
app:fabSize="normal" />