You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<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}} />
The text was updated successfully, but these errors were encountered:
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
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
<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}} />
The text was updated successfully, but these errors were encountered: