Skip to content
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

selfAlign needs to be split in two: selfAlignHorizontal and selfAlignVertical #13761

Closed
vrnDhmn opened this issue May 3, 2017 · 0 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@vrnDhmn
Copy link

vrnDhmn commented May 3, 2017

<View style={{selfAlign: 'center', height: 100, width: 100}} />
This view can never be placed in centre of screen without a parent View.

If we get screen width, below is the only way to centre an standalone element:
<View style={{selfAlign: 'center', left: (screenHeight / 2) - 50, height: 100, width: 100}} />

If we had selfAlignHorizontal and selfAlignVertical:
<View style={{selfAlignHorizontal: 'center', selfAlignVertical: 'center', height: 100, width: 100}} />

@vrnDhmn vrnDhmn changed the title selfAlign needs to be split in two. selfAlignHorizontal and selfAlignVertical selfAlign needs to be split in two: **selfAlignHorizontal** and **selfAlignVertical** May 3, 2017
@vrnDhmn vrnDhmn changed the title selfAlign needs to be split in two: **selfAlignHorizontal** and **selfAlignVertical** selfAlign needs to be split in two: selfAlignHorizontal and selfAlignVertical May 3, 2017
@hramos hramos closed this as completed Jun 26, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jun 26, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants