Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Provide a keyboard interactions property so scrollable views can influence closing soft keyboard on scroll #11983

@PureWeen

Description

@PureWeen

Description

Description

When the SoftKeyboard is visible, and the user starts scrolling there are a couple different ways the keyboard can react.

  • StayOpen: Keyboard stays open
  • CloseWithDownScroll: Keyboard immediately closes when scrolling down
  • FollowDownScroll: Keyboard follows scroll position (I think this is only possible on iOS)

Additional thoughts

  • Should we also add APIS for Up Scroll
  • If we add a KeyboardManager so users can open/close/position the keyboard themselves then do we even need this behavior?

(Public) API Changes

IScrollableKeyboardInteraction

Add this interface to any container that's capable of scrolling ScrollView, CarouselView, CollectionView`

Properties

API Description
SoftKeyboardScrollInteraction Gets or sets keyboard interaction when scrolling content.

KeyboardScrollInteraction

public enum KeyboardScrollInteraction
{
     Default, StayOpen, CloseWhenScrollingDown, FollowWhenScrollingDown
}

Usage Scenarios

XAML Example

<ScrollView SoftKeyboardScrollInteraction ="CloseWithDownScroll">
   <VerticalStackLayout>
        <Entry/>
        <Entry/>
        <Entry/>

Backward Compatibility

N/A

Difficulty

High

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions