Skip to content

Add option to open/close backdrop via scrolling #10

@fonix232

Description

@fonix232

While I realize that this is kind of antipattern (since Google said so), I think a great number of us would use a "pull to open" and "push to close" gesture bundled with NestedScrollView as content.

Right now my app uses a CollapsingToolbarLayout to achieve the same effect, but it's not the best as of now. I'd like to transition to a Backdrop implementation as it would fit my use case better.

The specific features I'm looking for:

  • By default, on first load, look like a regular toolbar/backdrop combo
  • On scroll down (pull down gesture), open backdrop
  • On scroll up, close backdrop (behaviour controlled with flags similar to CollapsingToolbarLayout)
  • On scroll up further, backdrop+toolbar behaviour controlled with flags similar to CollapsingToolbarLayout (especially the scroll and enterAlwaysCollapsed behaviours)

With these in mind, I'm thinking of the following scenarios:

  • User is on top of scrolled content, scrolls up (i.e. pulls down). The backdrop is opened fully (snap behaviour of CollapsingToolbarLayout)
  • User is on opened backdrop, scrolls down (i.e. pulls up). The backdrop is closed, previous state is restored
  • User is on top of scrolled content, scrolls down. Depending on the scroll flag, the visible Toolbar part of the backdrop is either hidden (scroll behaviour of Toolbar) or sticks to the top (default behaviour of the toolbar)
  • User is in middle of content, and scrolls up. Depending on scroll flag, the Toolbar either becomes visible (enterAlwaysCollapsed behaviour of Toolbar), or stays hidden (scroll behaviour of toolbar)
  • User is in middle of content, and Toolbar is visible. User pulls down Toolbar. The backdrop opens fully, but scroll state of content is retained

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions