Skip to content

Center multiline <Text> Component #16865

@AishwaryaSurana

Description

@AishwaryaSurana

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

OS: macOS Sierra 10.12.6
Node: 8.7.0
Yarn: Not Found
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: 2.3 AI-162.4069837

react-native: 0.49.5
react: 16.0.0-beta.5

Steps to Reproduce

1.Tried aligning through View Component
2.Tried aligning through Text Component

Expected Behavior

Text should be center aligned

Actual Behavior

Text not aligning to center

Reproducible Demo

If the <Text> is multilined than it is not center aligned


<View style = {{
    justifyContent: 'center',
    alignItems: 'center'}}>
          <Text style={{alignSelf:'center',fontSize:20,justifyContent:'center',alignItems:'center'}}>
             A very big multiline text that can not be accumulated in a single line is shown here with all the attributes trying to center it</Text>
        </View>
        

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions