react-native icon indicating copy to clipboard operation
react-native copied to clipboard

KeyboardAvoidView not working on the android platform

Open EdwinMurimi opened this issue 2 years ago • 2 comments

Description

On the android platform when you use the KeyboardAvoidView the inputs are partially visible and when you apply the KeyboardVerticalOffset some gray background proceeds on pushing the contents further away upwards but you cannot see the underlying components. I have been trying to look for a work around for this but still no solution. Will we ever be safe from the KeyboardAvoidView?

I am also using expo 47.0.12

React Native Version

0.70.5

Output of npx react-native info

info Fetching system and libraries information... System: OS: Windows 10 10.0.22621 CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz Memory: 3.92 GB / 15.60 GB Binaries: Node: 16.17.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD npm: 8.15.0 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: AllowAllTrustedApps: Disabled Versions: 10.0.19041.0 IDEs: Android Studio: Not Found Visual Studio: 17.3.32825.248 (Visual Studio Community 2022) Languages: Java: 11.0.14 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.5 => 0.70.5 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found info React Native v0.71.3 is now available (your project is running on v0.70.5). info Changelog: https://github.com/facebook/react-native/releases/tag/v0.71.3 info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.70.5 info For more info, check out "https://reactnative.dev/docs/upgrading".

Steps to reproduce

Create a component with a ScrollView as the parent. then wrap that ScrollView with KeyboardAvoidView and behaviour height. give it some offset (preferably a huge negative offset because a positive offset continues to push the contents behind the keyboard). At this point you will see what I am seeing

Snack, code example, screenshot, or link to a repository

image

EdwinMurimi avatar Feb 28 '23 16:02 EdwinMurimi

:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

github-actions[bot] avatar Feb 28 '23 16:02 github-actions[bot]

hello guys,

may be https://stackoverflow.com/a/48759750 this link will useful.

priyaWedo avatar Mar 06 '23 12:03 priyaWedo

react native's keyboard avoiding view is pretty clunky to work with (hard to understand behavior, inconsistent across platforms).

I made a package that I always use because it works the same cross platform and works with any layout if anyone wants to give it a try https://github.com/iway1/react-native-keyboard-avoider

iway1 avatar Mar 25 '23 00:03 iway1

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Sep 21 '23 05:09 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Sep 28 '23 05:09 github-actions[bot]

thank you @iway1 ! life saver.

lei-cao avatar Aug 06 '24 02:08 lei-cao