首页 > 解决方案 > 整页没有滚动反应本机

问题描述

我正在使用 Wix react-native-navigation V2 我已更改android:windowSoftInputMode为,"adjustPan"因为选项卡位于键盘上方,但现在在我的一种表单中,我有联系表单现在我想从键盘上方滚动整个而不显示上方的选项卡键盘我该怎么办。

下面是我的 AndroidManifest.xml 文件

<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>

如果有人对此有任何想法,请提供帮助。提前致谢

标签: react-nativekeyboardscrollviewreact-native-navigationadjustpan

解决方案


实际上,我猜您的问题与 Android 或 iOS 原生端无关。此外,它与您用于实现 UI 的库无关。您应该react-native为使用它的组件设置样式。请注意以下代码:

import { SomeComponent } from 'anywhere';
import { StyleSheet } from 'react-native';
...
<SomeComponent style={styles.container}>
...
const styles = StyleSheet.create({
  container: {
    minHeight: '100%'
  }
});

伙计,相信我,如果SomeComponentScrollView或其他任何财产,它肯定会得到卷轴。

老实说,我遇到了这个问题,我发现问题出在我的造型上,而不是其他问题。


推荐阅读