android - Coordinator Layout with RecyclerView -


i using coordinatorlayout recyclerview.the app runs fine problem the view should scroll items in recyclerview.in case have 3 items cordinatorlayout scroll recyclerview till snap top because of getting below part white listsize 3.

xml

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent">      <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.support.design.widget.appbarlayout             android:id="@+id/app_bar_layout"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:background="@android:color/transparent"             android:theme="@style/themeoverlay.appcompat.dark.actionbar">              <android.support.design.widget.collapsingtoolbarlayout                 android:id="@+id/collapsing_toolbar_layout"                 android:layout_width="match_parent"                 android:layout_height="match_parent"                  app:contentscrim="@android:color/transparent"                 app:layout_scrollflags="scroll|exituntilcollapsed">                        <imageview                         android:layout_width="wrap_content"                         android:layout_height="wrap_content"                         android:layout_alignbottom="@+id/textview38"                         android:layout_alignparenttop="true"                         android:padding="20dp"                         android:src="@drawable/ic_filter_back" />                 </android.support.design.widget.collapsingtoolbarlayout>          </android.support.design.widget.appbarlayout>            <android.support.v7.widget.recyclerview             android:id="@+id/rv_event_details"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:cliptopadding="false"             app:layout_behavior="@string/appbar_scrolling_view_behavior" />     </android.support.design.widget.coordinatorlayout>      <linearlayout         android:id="@+id/linearlayout2"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_alignparentbottom="true"         android:background="#fff"         android:orientation="horizontal"         android:paddingbottom="03dp">          <relativelayout             android:id="@+id/rl_tab1"             android:layout_width="0dp"             android:layout_height="wrap_content"             android:layout_weight="1">              <imageview                 android:id="@+id/tab1"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_centerhorizontal="true"                 android:padding="05dp"                 android:src="@drawable/ic_create_wedding_admin" />              <textview                 android:id="@+id/tv_tab_1"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_below="@+id/tab1"                 android:layout_marginleft="05dp"                 android:layout_marginright="05dp"                 android:gravity="center"                 android:text="admin" />           </relativelayout>           <relativelayout             android:id="@+id/rl_tab2"             android:layout_width="0dp"             android:layout_height="wrap_content"             android:layout_weight="1">              <imageview                 android:id="@+id/tab2"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_centerhorizontal="true"                 android:padding="05dp"                 android:src="@drawable/ic_create_wedding_guests" />              <textview                 android:id="@+id/tv_tab_2"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_below="@+id/tab2"                 android:layout_marginleft="05dp"                 android:layout_marginright="05dp"                 android:gravity="center"                 android:text="guests" />           </relativelayout>           <relativelayout             android:id="@+id/rl_ed_tab_guests"             android:layout_width="0dp"             android:layout_height="wrap_content"             android:layout_weight="1">              <imageview                 android:id="@+id/iv_ed_iv_budget"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_centerhorizontal="true"                 android:padding="05dp"                 android:src="@drawable/ic_create_wedding_budget" />              <textview                 android:id="@+id/tvbud"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_below="@+id/iv_ed_iv_budget"                 android:layout_marginleft="05dp"                 android:layout_marginright="05dp"                 android:gravity="center"                 android:text="budget" />           </relativelayout>           <relativelayout             android:id="@+id/rl_ed_tab_tasks"             android:layout_width="0dp"             android:layout_height="wrap_content"             android:layout_weight="1">              <imageview                 android:id="@+id/iv_ed_iv_tasks"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_centerhorizontal="true"                 android:padding="05dp"                 android:src="@drawable/ic_create_wedding_tasks" />              <textview                 android:id="@+id/tv_ed_tasks"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_below="@+id/iv_ed_iv_tasks"                 android:layout_marginleft="05dp"                 android:layout_marginright="05dp"                 android:gravity="center"                 android:text="tasks" />           </relativelayout>   </linearlayout> 

what want scroll view till item size.

this issue has been brought up. please check other questions before posting another.

you need provide custom behavior child layout in coordinator layout.

check if helps:

https://stackoverflow.com/a/33461064/2346980


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -