I use https://github.com/nhaarman/ListViewAnimations to implement the drag&drop, swipe to delete etc. But there are problems the first image can scroll the list but cannot drag&drop (it drop to the same location and it don't enter the onItemMoved)
The second image I remove the linearLayout. Now I can scroll and drag&drop but the layout is broken.
I think I will measure the whole screen height the directly fix the height of NestedScrollView. But I think it may not a best practice for this problem. My question was is there a better way to fix my problems?
The third image I remove the linearLayout and NestedScrollView so user cannot scroll the list.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawerLayout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.CoordinatorLayout
android:id="@+id/rootLayout"
android:layout_width="match_parent"
android:background="@color/green_400"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="180dp"
>
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsingToolbarLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:contentScrim="@color/transparent"
app:expandedTitleMarginStart="@dimen/expanded_toolbar_title_margin_start"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
>
<!--app:layout_scrollFlags="scroll|exitUntilCollapsed"|-->
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@drawable/header"/>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:background="@android:color/transparent"/>
</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"
android:fillViewport="true"
android:background="@color/red_600"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<com.nhaarman.listviewanimations.itemmanipulation.DynamicListView
android:id="@+id/listViewTaskInComplete"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<include layout="@layout/floating_action_btn"/>
</android.support.design.widget.CoordinatorLayout>