How to attach Floating Action Button from the library of support to CardView so that when scrolling, using ScrollView, the button went up along with the card?

  • Just put the FAB inside the card .... - Yuriy SPb
  • It is necessary that she speak for the edge of the card, cling it with the help of anchor - Vyacheslav Rodionov 10:51 pm

1 answer 1

Place the CardView and FAB inside the FrameLayout , which will already be inside the ScrollView - so you can place the FAB over CardView as you please with layout_gravity , they will both be inside a scrollview, then both will scroll together

  • Thanks, it worked out - Vyacheslav Rodionov
  • Most likely CoordinatorLayout and layout_anchorGravity :) - Flippy