简体   繁体   中英

Scrolling after scrolling in recycler view

I would like to put a scrollable Recycler View, but at the end of the Recycler View, I would like to show other elements in the bottom of the scroll.

在此处输入图片说明

How can I do that ?

There is my code :

<android.support.v7.widget.RecyclerView
    android:id="@+id/recyclerView_card_elements"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="LOG OUT"
        android:layout_margin="10dp"
        android:textStyle="bold"
        android:textSize="18sp"/>

</RelativeLayout>

maybe you need something like this:

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

<android.support.v7.widget.RecyclerView
    android:id="@+id/recyclerView_card_elements"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" />

<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="LOG OUT"
        android:layout_margin="10dp"
        android:textStyle="bold"
        android:textSize="18sp"/>

</RelativeLayout>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM