Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[AppBarLayout] Inconsistent default scrollFlags between XML and code #5082

Copy link
Copy link

Description

@huajiqaq
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.