Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/natario1/nestedscrollcoordinatorlayout

A CoordinatorLayout that implements nested scrolling and propagates scroll events to parent views.
https://github.com/natario1/nestedscrollcoordinatorlayout

android android-fragments android-library android-ui coordinator-layout coordinatorlayout

Last synced: 6 days ago
JSON representation

A CoordinatorLayout that implements nested scrolling and propagates scroll events to parent views.

Awesome Lists containing this project

README

        

# NestedScrollCoordinatorLayout

```groovy
compile 'com.otaliastudios:nestedscrollcoordinatorlayout:1.0.3'
```

A `CoordinatorLayout` that implements nested scrolling and propagates scroll events to parent views.
This is useful for nested Coordinators, e.g. for inner fragments in a parent activity.
By default, scroll events that take place inside the inner `CoordinatorLayout` won't reach the outer
coordinator, and thus they won't trigger scroll animations and so on.

If `NestedScrollCoordinatorLayout` is used, events are correctly propagated.

## Usage

Just use `NestedScrollCoordinatorLayout` as the inner `CoordinatorLayout`.

```xml






```

You can have slight control over the scroll propagation behavior using
`NestedScrollCoordinatorLayout.setPassMode()`. Specifically:

- `PASS_MODE_BOTH` (default): scroll events are passed to the parent stream and, at the same time,
to this Coordinator childs
- `PASS_MODE_PARENT_FIRST`: scroll events are passed to the parent stream and, if not consumed,
they go on to this Coordinator childs

## Contributing

You are welcome to contribute with issues, PRs or suggestions.