“react-native-mathjax”高度自动调整不起作用

问题描述

我正在使用 new SweetAlertDialog(this,SweetAlertDialog.SUCCESS_TYPE) .setTitleText("Good job!") .setContentText("You clicked the button!") .show(); // dont forget to add this in build.gradle implementation 'com.github.f0ris.sweetalert:library:1.6.2' 在我的 React Native 应用程序中呈现数学方程,但自动调整 webview 的高度在 react-native-mathjax 库中不起作用。 react-native-mathjax 使用前一个高度来呈现下一个查询。如何在我的应用中调整视图高度?

react-native-mathjax

解决方法

react-native-autoheight-webview 中使用 react-native-mathjax 而不是 react-native-webview。当您移动到下一个查询时,它会自动调整 webview 的高度。

npm install react-native-autoheight-webview