react-nativekeyboardscrollviewreact-native-navigationadjustpan

Full page not getting scrolled react-native


I am using Wix react-native-navigation V2 I have changed android:windowSoftInputMode to "adjustPan" because the tabs were coming above the keyboard, but now in my one of the form I have contact form now I want to scroll whole from above the keyboard without showing tabs above the keyboard what should I do.

below is my AndroidManifest.xml file

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.newnavigation">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />  

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustPan">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>

</manifest>

Please help if anyone have an idea about it. Thanks in advance


Solution

  • Thanks @Mehrdad88sh I have solved it by using KeyboardAvoidingView

    import { KeyboardAvoidingView } from 'react-native';
    
    <KeyboardAvoidingView style={styles.container} behavior="padding" enabled>
      ... your UI ...
    </KeyboardAvoidingView>
    

    for more details see given link https://facebook.github.io/react-native/docs/keyboardavoidingview