Skip to content Skip to sidebar Skip to footer

How To Add And Remove Layout Behavior Programmatically To Linearlayout

You can add the app:layout_behavior='@string/appbar_scrolling_view_behavior' behavior to a LinearLayout in the XML declaration but I haven't found a way to do the same in code. Wit

Solution 1:

You're misunderstanding LayoutParams concept a bit.

LayoutParams object is related to the enclosing ViewGroup, not to the modified ViewGroup itself.

Post a Comment for "How To Add And Remove Layout Behavior Programmatically To Linearlayout"