0
app:layout_collapseMode="pin"

This attribute seems to only work if the view is a toolbar and won't work on other views such as relativelayout, why?

Artem Mostyaev
  • 3,874
  • 10
  • 53
  • 60
  • check this ans it will sure help you https://stackoverflow.com/questions/36794409/how-to-pin-two-buttons-below-toolbar-while-scrolling – AskNilesh Oct 13 '17 at 13:30
  • Possible duplicate of [How to pin two buttons below toolbar while scrolling](https://stackoverflow.com/questions/36794409/how-to-pin-two-buttons-below-toolbar-while-scrolling) – AskNilesh Oct 13 '17 at 13:30

1 Answers1

0

app:layout_collapseMode= "pin"

  • pin is set to this mode, the Toolbar can remain on the screen when the CollapsingToolbarLayout is fully shrunk.

  • Fixed mode, finally fixed at the top of the fold

Because it was CollapsingToolbarLayout's attribute .

And it also used in CoordinatorLayout .

KeLiuyue
  • 8,149
  • 4
  • 25
  • 42