MathView container styling between Android and iOS is inconsistent
Closed this issue · 3 comments
Hi ShaMan,
Thanks for making this library.
I'm looking at this issue.
Summary
Unlike iOS, height of MathView Component is set on Android.
Steps to reproduce
It was reproduced using MathView on mattermost mobile. (Due to the version conflict issue, I couldn't reproduce using the MathExmaple
)
Expected behavior
MathView container styling of Android and ios should be consistent.
Observed behavior
Android (14.0) | iOS (17.0) |
---|---|
![]() |
![]() |
Possible fixes
There might be a problem with the android code and container style
ref : iOS code
Before : style={[styles.container, props.resizeMode === 'contain' && styles.contain, props.style]}
After : style={[props.resizeMode === 'contain' && styles.contain, props.style]}
Android (Before) | Android (After) |
---|---|
![]() |
![]() |
(Tested on react-native-math-view - 3.9.5)
Thank you for reading. Happy New Year :)
To ensure consistent heights between Android and iOS, I'm considering using MathViewFallback instead of MathView.
What is the difference between MathView and MathViewFallback? As far as I know, MathViewFallback uses SVG. Is there a difference in performance?
I don't actively use or maintain this repo, I abadoned RN.
Welcome to PR and/or join as a contributor.
SVG is significantly slower if I recall correctly