ImeNestedScrollConnection

class ImeNestedScrollConnection(view: View, scrollImeOffScreenWhenVisible: Boolean, scrollImeOnScreenWhenNotVisible: Boolean) : NestedScrollConnection

A NestedScrollConnection which scrolls the Android on-screen keyboard on/off screen as appropriate, when the user scrolls content. This class may be made an internal library class in the future.

You probably do not wish to use this directly, and should use rememberImeNestedScrollConnection instead.

Parameters

view

The host Compose View. Usually this comes from LocalView.

scrollImeOffScreenWhenVisible

Set to true to allow scrolling the IME off screen (from being visible), by an downwards scroll. Defaults to true.

scrollImeOnScreenWhenNotVisible

Set to true to allow scrolling the IME on screen (from not being visible), by an upwards scroll. Defaults to true.

Constructors

ImeNestedScrollConnection
Link copied to clipboard
fun ImeNestedScrollConnection(view: View, scrollImeOffScreenWhenVisible: Boolean, scrollImeOnScreenWhenNotVisible: Boolean)
The host Compose View.

Functions

onPostFling
Link copied to clipboard
open suspend override fun onPostFling(consumed: Velocity, available: Velocity): Velocity
onPostScroll
Link copied to clipboard
open override fun onPostScroll(consumed: Offset, available: Offset, source: NestedScrollSource): Offset
onPreFling
Link copied to clipboard
open suspend fun onPreFling(available: Velocity): Velocity
onPreScroll
Link copied to clipboard
open override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset