アクションモードの開始時にRecyclerview
のビューをCoordinatorlayout
に表示しようとしています。しかし、私が下にスクロールするまでは見えません。 app:layout_behavior="@string/appbar_scrolling_view_behavior"
を削除した場合は、 を取得しますが、Recyclerviewはツールバーの下に表示されます。 Coordinatorlayout
を使用して、どのように視界を常に見えるようにするかに関する提案。コーディネーターレイアウトの下部ビューがスクロールダウンされるまで表示されない
主レイアウト:
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<include layout="@layout/toolbar" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/list" />
</android.support.design.widget.CoordinatorLayout>
リストのレイアウト:変更以下
<RelativeLayout 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:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="@+id/bottomView"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_alignParentBottom="true"
android:background="@color/colorPrimary"
android:orientation="vertical">
</LinearLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/layoutDummy">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</android.support.v4.widget.SwipeRefreshLayout>
</RelativeLayout>
それは動作しません。スクロールすると、ボトムビューのみが表示されます。コーディネーターのレイアウトのスクロール動作が原因です。 – RisingUp