Skip to content

Commit

Permalink
fix(rn): 修复 Android 端 navigation header title 不居中的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Pines-Cheng committed Mar 25, 2019
1 parent 7791edb commit 5fb6fab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-router-rn/src/getWrappedScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function getWrappedScreen (Screen, Taro, globalNavigationOptions = {}) {
...rest,
headerTitle: <View style={{flexDirection: 'row', alignItems: 'center'}}>
{navigation.getParam('isNavigationBarLoadingShow') && <LoadingView />}
<Text style={{fontSize: 17, fontWeight: '600', color: headerTintColor}}>{title}</Text>
<Text style={{flexDirection: 'row', flex: 1, fontSize: 17, fontWeight: '600', textAlign: 'center'}}>{title}</Text>
</View>,
headerTintColor,
headerStyle: {
Expand Down

0 comments on commit 5fb6fab

Please sign in to comment.