react-native - 整页没有滚动反应本机
问题描述
我正在使用 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>
如果有人对此有任何想法,请提供帮助。提前致谢
解决方案
实际上,我猜您的问题与 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%'
}
});
伙计,相信我,如果SomeComponent
是ScrollView
或其他任何财产,它肯定会得到卷轴。
老实说,我遇到了这个问题,我发现问题出在我的造型上,而不是其他问题。
推荐阅读
- javascript - 您如何定位表格主体以“适合”表格标题和行标题?
- decimal - (C++) 如何四舍五入像 1.05000 这样的小数?
- angular - 在选择器中使用 open 方法展开 mat-expansion-panel
- vba - 循环更改后立即更新每个形状的填充颜色
- swift - 按下更改图像的按钮时崩溃
- regex - 如果存在,则在 Jenkins 中调用特定的 ANT 目标
- flutter - 浮动操作按钮中心停靠,重叠任何屏幕或对话?
- javascript - AnalyserNode.getByteFrequencyData 中的数据对应什么时间窗口?
- android - Java 方法名称约定
- python - 为什么我在使用 .mean() 时会得到 NaN