GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [AppBarLayout] Inconsistent default scrollFlags between XML and code · Issue #5082 · material-components/material-components-android

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

New issue
Copy link
New issue
Copy link
Open
Open
[AppBarLayout] Inconsistent default scrollFlags between XML and code#5082
Copy link
Labels
bug

Description

@huajiqaq
huajiqaq
opened on May 11, 2026
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.

Activity

  1. huajiqaq
    added
    bug
    on May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.