4

Can anyone explain me about this property "app:layout_behavior="@string/appbar_scrolling_view_behavior"?

Suraj Vaishnav
  • 7,777
  • 4
  • 43
  • 46
Dezo
  • 835
  • 9
  • 16
  • check https://stackoverflow.com/questions/32832717/no-resource-identifier-found-for-attribute-layout-behavior-in-package , look for kris larson's answer – Swapnil Kadam Apr 21 '18 at 17:43

2 Answers2

2

Change android.support.constraint.ConstraintLayout ✖ to android.support.design.widget.CoordinatorLayout ✓ then the child elements can use app:layout_behavior

1

If you use CoordinatorLayout you can use layout behaviors such as hiding FloatingActionButton while scrolling list or hide toolbar while scrolling list. The behaviour you are asking about is used for the 2nd case, where this behaviour should be set on view which triggers toolbar scrolling. This string resource contains class name which defines the behaviour. You can create custom behaviours as well.

user221256
  • 415
  • 5
  • 14