-1

Update: I have solved this problem just by listen to the scroll change event of the NestedScrollView and do the appropriate handling there.

I'm following this tutorial to animate showing and hiding of my FloatingActionButton. But it doesn't really work for my layout. My layout is like this picture:

enter image description here

It has a NestedScrollView and a number of RecyclerView inside. When I scroll by touching the area of NestedScrollView, the FloatingActionButton is animated as expected. But when I scroll by touching the area of one of the RecyclerViews, the FloatingActionButton don't animate at all. When I try debug my code, I realize that the onNestedScroll method doesn't gets called when I scroll by touching on the area of RecyclerView.

Jongware
  • 22,200
  • 8
  • 54
  • 100
congtrungvnit
  • 635
  • 1
  • 10
  • 16
  • Possible duplicate of [FloatingActionButton doesn't hide](http://stackoverflow.com/questions/31269958/floatingactionbutton-doesnt-hide) – NOT_A_PROGRAMMER Apr 06 '16 at 17:25

1 Answers1

-1

Comment out or delete this code block from your xml layout

  <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:clickable="true"
        android:src="@drawable/ic_done"
        app:layout_anchor="@id/viewA"
        app:layout_anchorGravity="bottom|right|end"/>
Biswajit Karmakar
  • 9,799
  • 4
  • 39
  • 41