le0zh's blog

//DON'T PANIC

主页 归档
2016-10-28
react-native

react-native-android下NavigationBar的title居中

加一个内置的样式就可以了:

1
2
3
4
5
6
7
8
9
<Navigator.NavigationBar
navigationStyles={Navigator.NavigationBar.StylesIOS}
routeMapper={{
LeftButton: this.navBarLeftButton,
RightButton: this.navBarRightButton,
Title: this.navBarTitle,
}}
style={{ backgroundColor: 'gray' }}
/>

就是navigationStyles={Navigator.NavigationBar.StylesIOS}

参考:
https://github.com/facebook/react-native/pull/3028

相关讨论:
https://github.com/facebook/react-native/issues/3142

Share
  • react-native
Newer
ReactNative ReloadJs的实现
Older
使用sinopia搭建私有服务器

Categories

  • exception1
  • game3
  • javascript28
  • myproject1
  • nodejs2
  • react1
  • react-native8
  • tools4
  • windows1
  • 问题记录1
  • 随笔1

Tags

  • ES61
  • cmd1
  • dva1
  • es62
  • express1
  • javascript21
  • jstips13
  • myproject1
  • nodejs1
  • npm1
  • react6
  • react-native16
  • sublimetext1
  • tips1
  • tools2
  • unity3
  • vscode1
  • windows1
  • you-dont-know-js1
  • 个人1

Tag Cloud

ES6 cmd dva es6 express javascript jstips myproject nodejs npm react react-native sublimetext tips tools unity vscode windows you-dont-know-js 个人

Archives

  • September 20171
  • August 20171
  • July 20171
  • June 20172
  • May 20172
  • March 20172
  • January 20173
  • December 20163
  • November 20162
  • October 20162
  • September 20162
  • June 20164
  • April 20166
  • March 20165
  • February 20163
  • January 201612

Recents

  • dva框架学习--Subscription订阅
  • vscode插件:正则表达式预览
  • 你可能不知道的try...finally
  • 写一个尽可能完善的Function.prototype.bind方法
  • 使用ReactNative开发的gitbook阅读器
© 2017 le0zh
Powered by Hexo
主页 归档