【发布时间】:2016-12-16 23:04:42
【问题描述】:
我刚刚发现了用于 react-native 的 NativeBase,我真的很喜欢它。我正在关注他们网站上的教程。我了解 NativeBase 使用 Easy-Grid 进行布局。我想在我的页面上垂直居中一个按钮。这是我正在构建的测试应用程序的简单界面:
<Container>
<Header>
<Button trnsparent>
<Icon name='ios-menu' />
</Button>
<Title>Poki</Title>
</Header>
<Content style={{padding: 10}}>
<Grid>
<Col>
<Button block bordered info style={{flex: 1}}>Login</Button>
</Col>
</Grid>
</Content>
<Footer>
<FooterTab>
<Button transparent>
<Icon name='ios-call' />
</Button>
</FooterTab>
</Footer>
</Container>
如何使用 easy-grid 在我的页面上垂直居中登录按钮?我尝试应用 flexbox 属性但没有结果。
感谢您的帮助。
【问题讨论】:
标签: android react-native native-base