Button not working fine in android
See original GitHub issueHi! Thanks for trying out NativeBase! Due to the overwhelming requests and issues/questions we ask you to add the following details with your issue.
Please check the existing open/closed issues for a possible duplicate before creating a new issue 😃
Also,DO fill out the below form to give us a better idea about your environment and help us debug it quicker. Issues without the required details will mostly be unattended to.
react-native, react and native-base version
"native-base": "^2.4.1", "react": "16.3.1", "react-native": "0.55.1",
Expected behavior
i.e in iOS
Actual behavior
in android it looks like this
Steps to reproduce (code snippet or screenshot)
const ButtonNative = ({ title, icon ,onPress }) => ( <Button rounded style={styles.roleBtn} onPress={onPress}> <Left> <Icon name={icon} style={styles.roleIcon} /> </Left> <Text>{title}</Text> <Right /> </Button> );
`const styles = StyleSheet.create({ roleBtn: { marginVertical: 10, backgroundColor: “#444”, zIndex: -1000, paddingVertical: 10, paddingHorizontal: 10, fontSize: 30,
}, roleIcon: { paddingLeft: 15, fontSize: 30, color: “#fff” } });`
Screenshot of emulator/device
Is the bug present in both ios and android or in any one of them?
An android device only works fine on iOS
Any other additional info which would help us debug the issue quicker.
I tried giving left body and right to align the button full width but the text was not visible then neither the icon
also one more thing Please
can you tell me anyway by which the header can have the title in the center in both android and ios and not only in ios? I developed the whole code in iOS simulator but now it looks very much odd in Android, also the text field for the title is very limited it shows … after certain width.I used the native base library because of these components only. Please help as soon as possible.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top GitHub Comments
@sudhirkumarojhaa use
block
props with<Button/>
#1852 Fixed