react-native-community / discussions-and-proposals

Discussions and proposal related to the main React Native project
https://facebook.github.io/react-native/
1.66k stars 125 forks source link

Add the possibility to remove UI native animations #599

Open sirusbaladi opened 1 year ago

sirusbaladi commented 1 year ago

Introduction

It's now popular in many apps to have the sign up / log in screen with the keyboard already open and with inputs in autofocus. It is great from a UX perspective. Currently there's no way to have the immediately keyboard immediately open in a new screen without seeing the "sliding up" animation.

Details

Something that corresponds to [UIView setAnimationsEnabled:NO]; which is the way to disable the animation for iOS, or setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE); for Android.

Discussion points

There are few people that asked about this: https://stackoverflow.com/questions/71578015/keyboard-automatically-shown-after-open-the-screen https://stackoverflow.com/questions/45581681/how-to-disable-keyboard-appearance-animation-in-react-native

a-eid commented 1 year ago

this works on ios if you autofocus an input & your using a native navigation solution such as RNN, the navigation router or the native stack.

https://user-images.githubusercontent.com/19273413/218287804-5adb7b2f-28ae-41c6-9c19-a97c0d3dce1b.mp4

I'm not sure if it's possible on android, how does native android behave ?