react-native icon indicating copy to clipboard operation
react-native copied to clipboard

'padding' not work in android

Open 999946 opened this issue 10 years ago • 9 comments

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 qq20160531-0
  • iOS simulator screen shot 2016 5 31 6 18 41

Versions

"react": "^15.1.0", "react-native": "^0.27.0-rc2"

999946 avatar May 31 '16 10:05 999946

why no apply padding to the View rather than to Text? or did you try margin in Text?

alimek avatar May 31 '16 18:05 alimek

I have the same problem。But change to margin is work well。

xxn520 avatar Jul 19 '16 02:07 xxn520

I have the same problem, margin works.

tomazahlin avatar Aug 22 '16 15:08 tomazahlin

+1

xiDaiDai avatar Sep 03 '16 09:09 xiDaiDai

+1

bawn avatar Nov 24 '16 08:11 bawn

marginLeft: -40 not work

ghost avatar Dec 27 '16 07:12 ghost

margin not work too for me

"react": "~15.4.0"
"react-native": "0.41.2"

apopek avatar Feb 13 '17 16:02 apopek

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.

hramos avatar Jul 20 '17 21:07 hramos

+1

abdifardin avatar Sep 06 '17 15:09 abdifardin