Native Base - 放置在Header中的组件不是垂直居中的 react-native
Native Base - The components placed in the Header are not vertically centered react-native
我尝试使用 Native Base 定制器 link 定制 Native Base 的主题。
一旦我应用了这个新的自定义主题,页眉中的组件就不再垂直居中了。您可以在顶部看到额外的 space。我怎样才能解决这个问题。默认主题可以正常工作。
查看:
static navigationOptions = {
headerTitleStyle: { justifyContent: 'center' }
}
大家好 在更详细地研究了这个问题之后,我找到了错位的根本原因。
这是因为通过 https://nativebase.io/customizer/ 下载的主题以 'ios' 作为默认平台,因此 header 组件的高度在 android 中不正确并且根据 IOS。
在使用正确的平台后,我能够解决 android 中的问题。
我尝试使用 Native Base 定制器 link 定制 Native Base 的主题。
一旦我应用了这个新的自定义主题,页眉中的组件就不再垂直居中了。您可以在顶部看到额外的 space。我怎样才能解决这个问题。默认主题可以正常工作。
查看:
static navigationOptions = {
headerTitleStyle: { justifyContent: 'center' }
}
大家好 在更详细地研究了这个问题之后,我找到了错位的根本原因。
这是因为通过 https://nativebase.io/customizer/ 下载的主题以 'ios' 作为默认平台,因此 header 组件的高度在 android 中不正确并且根据 IOS。
在使用正确的平台后,我能够解决 android 中的问题。