Enable AdjustPan
and AdjustResize
behavior for iOS as well as Android
#11979
Open
Labels
Milestone
Description
Currently we have a platform specific for
WindowSoftInputModeAdjust
that maps directly toAndroid
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 whyAdjustResize
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
Android
becauseAdjustPan
shifts 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 aScrollView
and 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 toScrollView
to 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
Window Attached Property
Window property (maybe)
Non-Shell Scenarios (also should work if using shell)
Shell property
Shell has these types of properties already so for consistency we should expose this through a shell attached property as well
TextInput property?
Maybe this is a property you'd want to configure on each input field?
Backward Compatibility
N/A
Difficulty
Medium
The text was updated successfully, but these errors were encountered: