-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
Currently we have a platform specific for WindowSoftInputModeAdjust that maps directly to Android level properties.
For the most part, we replicate (or are in the process of replicating) a lot of the keyboard interaction that Android provides out of the box to iOS so this API will help round that out.
This will be a way to toggle between the behavior implemented here here that will "Scroll" your content into view vs just "resizing" the view window.
This property should be available at the Window/Shell level
AdjustPan example and why AdjustResize is relevant on Android. You'll notice I can't get back to the top Entry field. This is very annoying if you're trying to implement a chat app.
Still to investigate
-
This property is a bit more relevant on
AndroidbecauseAdjustPanshifts the entire window up when the SoftKeyBoard opens. This makes it so fields at the top of your screen are unreachable. If you have content in aScrollViewand your window gets panned from the keyboard opening, then you are unable to reach any of the content at the top of your screen. Think about how annoying the current behavior is if someone is implementing a Chat App. -
On iOS we aren't going to be panning the entire window, so the relevance of this property does need to be investigated a little bit more. Is it useful on iOS to resize the view pane vs just scroll the scroll view? Is this scenario mainly relevant if the user doesn't have a ScrollView? What's our solution going to be on iOS if user doesn't have a ScrollView (currently on Xamarin.Forms scrolling the entry into view only works on iOS if your content is inside a ScrollView)
-
Is there overlap here with Safe Areas? For example, when the soft keyboard opens does that influence safe area insets at all and we should more be approaching this from a Safe Area standpoint?
-
Is this the wrong approach completely and we should just add some properties to
ScrollView. We could add a property toScrollViewto indicate that it should just adjust its insets based on the presence of the keyboard.
(Public) API Changes
Move current WindowSoftInputModeAdjust platform specific to an attached property that's available to everyone!
Usage Scenarios
- keyboard + accessory view + dictionary
Window Attached Property
Window property (maybe)
window.WindowSoftInputModeAdjust="AdjustPan"Non-Shell Scenarios (also should work if using shell)
<ContentPage Window.WindowSoftInputModeAdjust="AdjustPan">Shell property
Shell has these types of properties already so for consistency we should expose this through a shell attached property as well
<ContentPage Shell.WindowSoftInputModeAdjust="AdjustPan">TextInput property?
Maybe this is a property you'd want to configure on each input field?
<Entry Window.WindowSoftInputModeAdjust="AdjustPan">Backward Compatibility
N/A
Difficulty
Medium
Metadata
Metadata
Assignees
Labels
Type
Projects
Status