'padding' not work in android
Code
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class Test extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
WELCOME
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
backgroundColor:'red',
fontSize: 20,
textAlign: 'center',
padding: 10,
}
});
AppRegistry.registerComponent('Test', () => Test);
- Android

- iOS

Versions
"react": "^15.1.0", "react-native": "^0.27.0-rc2"
why no apply padding to the View rather than to Text? or did you try margin in Text?
I have the same problem。But change to margin is work well。
I have the same problem, margin works.
+1
+1
marginLeft: -40 not work
margin not work too for me
"react": "~15.4.0"
"react-native": "0.41.2"
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
- Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
- If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
- Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.
+1