Description:
AppBarLayout.LayoutParams defaults scrollFlags to SCROLL_FLAG_SCROLL (1) at field declaration, but XML inflation defaults to 0 (no scroll) when attribute is absent.
Expected behavior:
Both should default to 0 for consistency.
Source code:
// Field declaration - defaults to 1
int scrollFlags = SCROLL_FLAG_SCROLL;
// XML inflation - defaults to 0 when attribute missing
scrollFlags = a.getInt(R.styleable.AppBarLayout_Layout_layout_scrollFlags, 0);
Workaround:
Explicitly set params.scrollFlags = 0 when creating programmatically.
Description:
AppBarLayout.LayoutParamsdefaultsscrollFlagstoSCROLL_FLAG_SCROLL(1) at field declaration, but XML inflation defaults to0(no scroll) when attribute is absent.Expected behavior:
Both should default to
0for consistency.Source code:
Workaround:
Explicitly set
params.scrollFlags = 0when creating programmatically.