-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] alignItems: 'baseline' doesn't work #21918
Labels
Comments
Can you run If you believe this information is irrelevant to the reported issue, you may write |
maybe we can use this code to solve this problem, but I think it's not a good idea import React, { PureComponent } from 'react'
import { Text, View, StyleSheet } from 'react-native'
export default class FixTextBaseline extends PureComponent {
render() {
return (
<View style={styles.container}>
<View style={styles.textContainer}>
<Text>
<Text style={{ fontSize: 65, backgroundColor: '#ff9c6e' }}>1</Text>
<Text style={{ fontSize: 55, backgroundColor: '#ff9c6e' }}>1</Text>
<Text style={{ fontSize: 45, backgroundColor: '#ff9c6e' }}>1</Text>
<Text style={{ fontSize: 35, backgroundColor: '#ff9c6e' }}>1</Text>
<Text style={{ fontSize: 25, backgroundColor: '#ff9c6e' }}>1</Text>
</Text>
</View>
</View>
)
}
}
export const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center'
},
textContainer: {
justifyContent: 'center',
flexDirection: 'row'
// alignItems: 'baseline'
}
}) |
Dupe of #20666 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
on Android this bug still exists...
Environment
react-native-info
my package.json is
the Code is
ios is correct
But android is wrong
just like this #15858 (comment)
The text was updated successfully, but these errors were encountered: