android-components / mozilla.components.feature.session / CoordinateScrollingFeature

# CoordinateScrollingFeature

`class CoordinateScrollingFeature : SelectionAwareSessionObserver` (source)

Feature implementation for connecting an EngineView with any View that you want to coordinate scrolling behavior with.

A use case could be collapsing a toolbar every time that the user scrolls.

### Constructors

<init> | `CoordinateScrollingFeature(sessionManager: SessionManager, engineView: EngineView, view: View, scrollFlags: Int = DEFAULT_SCROLL_FLAGS)` Feature implementation for connecting an EngineView with any View that you want to coordinate scrolling behavior with.

### Inherited Properties

activeSession | `open var activeSession: Session?` the currently observed session

### Functions

onLoadingStateChanged | `fun onLoadingStateChanged(session: Session, loading: Boolean): Unit`
start | `fun start(): Unit` Start feature: Starts adding scrolling behavior for the indicated view.

### Inherited Functions

observeFixed | `fun observeFixed(session: Session): Unit` Starts observing changes to the specified session.
observeSelected | `fun observeSelected(): Unit` Starts observing changes to the selected session (see SessionManager.selectedSession). If a different session is selected the observer will automatically be switched over and only notified of changes to the newly selected session.
onSessionSelected | `open fun onSessionSelected(session: Session): Unit` The selection has changed and the given session is now the selected session.
stop | `open fun stop(): Unit` Stops the observer.

### Companion Object Properties

DEFAULT_SCROLL_FLAGS | `const val DEFAULT_SCROLL_FLAGS: Int`