Package 

Class ImeNestedScrollConnection

  • All Implemented Interfaces:
    androidx.compose.ui.input.nestedscroll.NestedScrollConnection

    @Deprecated(message = 
    accompanist/insets is deprecated.
    For more migration information, please visit https://google.github.io/accompanist/insets/#migration
    , replaceWith = @ReplaceWith(imports = {androidx.compose.foundation.layout.imeNestedScroll, androidx.compose.ui.Modifier}, expression = Modifier.imeNestedScroll())) 
    public final class ImeNestedScrollConnection
     implements 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.

    • Method Summary

      Modifier and Type Method Description
      Offset onPreScroll(Offset available, NestedScrollSource source)
      Offset onPostScroll(Offset consumed, Offset available, NestedScrollSource source)
      Velocity onPostFling(Velocity consumed, Velocity available)
      • Methods inherited from class com.google.accompanist.insets.ImeNestedScrollConnection

        onPreFling
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImeNestedScrollConnection

        ImeNestedScrollConnection(View view, Boolean scrollImeOffScreenWhenVisible, Boolean scrollImeOnScreenWhenNotVisible)
        Parameters:
        view - The host Compose View.
        scrollImeOffScreenWhenVisible - Set to true to allow scrolling the IME off screen (from being visible), by an downwards scroll.
        scrollImeOnScreenWhenNotVisible - Set to true to allow scrolling the IME on screen (from not being visible), by an upwards scroll.
    • Method Detail

      • onPreScroll

         Offset onPreScroll(Offset available, NestedScrollSource source)
      • onPostScroll

         Offset onPostScroll(Offset consumed, Offset available, NestedScrollSource source)
      • onPostFling

         Velocity onPostFling(Velocity consumed, Velocity available)