2

画面に移動すると、画面が右に移動して表示されることがあります。これは iOS でのみ発生します。アプリ全体をラップする Views (React Navigation によって提供される SafeAreaView も使用) を削除しようとしましたがKeyboardAviodingView、それらのいずれかが問題を引き起こしているかどうかを確認しましたが、うまくいきませんでした。SaveAreaView

例

package.json依存関係:

{
    "@unimodules/core": "~5.0.0",
    "axios": "^0.19.0",
    "expo": "^36.0.0",
    "expo-application": "^2.0.0",
    "expo-constants": "^8.0.0",
    "expo-font": "~8.0.0",
    "expo-linear-gradient": "~8.0.0",
    "expo-localization": "~8.0.0",
    "expo-secure-store": "~8.0.0",
    "expo-server-sdk": "^3.3.0",
    "formik": "^2.1.4",
    "i18n-js": "^3.3.0",
    "i18next": "^19.3.2",
    "immutable": "^4.0.0-rc.12",
    "lottie-react-native": "~2.6.1",
    "moment": "^2.24.0",
    "nyc": "^14.1.1",
    "react": "^16.12.0",
    "react-dom": "16.9.0",
    "react-hook-form": "^3.26.4",
    "react-i18next": "^11.3.3",
    "react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
    "react-native-animatable": "^1.3.3",
    "react-native-appearance": "~0.3.1",
    "react-native-calendars": "^1.264.0",
    "react-native-elements": "^1.2.7",
    "react-native-formik": "^1.7.7",
    "react-native-gesture-handler": "~1.5.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.1",
    "react-native-modal": "^11.5.1",
    "react-native-modal-datetime-picker": "^8.1.1",
    "react-native-paper": "^3.5.1",
    "react-native-parallax-scroll-view": "^0.21.3",
    "react-native-platform-touchable": "^1.1.1",
    "react-native-reanimated": "~1.4.0",
    "react-native-safe-area-context": "0.6.0",
    "react-native-screens": "2.0.0-alpha.12",
    "react-native-shared-element": "~0.5.1",
    "react-native-snap-carousel": "^3.8.4",
    "react-native-svg": "9.13.3",
    "react-native-svg-uri": "^1.2.3",
    "react-native-vector-icons": "^6.6.0",
    "react-native-web": "^0.11.7",
    "react-native-workers": "^0.3.1",
    "react-navigation": "4.1.1",
    "react-navigation-animated-switch": "^0.3.2",
    "react-navigation-collapsible": "^3.0.3",
    "react-navigation-drawer": "^2.2.2",
    "react-navigation-fluid-transitions": "^0.3.2",
    "react-navigation-header-buttons": "^3.0.3",
    "react-navigation-material-bottom-tabs": "2.1.2",
    "react-navigation-shared-element": "^0.5.0",
    "react-navigation-stack": "1.9.3",
    "react-navigation-tabs": "^2.5.6",
    "react-redux": "^7.1.1",
    "recompose": "^0.30.0",
    "redux": "^4.0.4",
    "redux-thunk": "^2.3.0",
    "remove": "^0.1.5",
    "sentry-expo": "^2.0.1",
    "yup": "^0.27.0"
}

EDIT:画面Bにキーボードを表示してから画面Aに戻ると、エラーが発生します

4

2 に答える 2

0

この問題は次の場合に発生します。

1) 画面に移動します -> this.props.navigation.navigate ('');

2) アプリケーションをフォアグラウンドに置きます。

3) 戻る -> navigation.goBack ();

4) 画面が右に移動しているのがわかります。

于 2020-04-01T10:27:24.943 に答える