mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Allow for styling of ToolbarAndroid's overflow icon
Summary: Fixes #2858. Here's a screenshot of the custom overflow icon in action: <img width="638" alt="overflow" src="https://cloud.githubusercontent.com/assets/1309177/10567090/693e395a-75ae-11e5-84cd-20b19149c620.png"> Closes https://github.com/facebook/react-native/pull/3497 Reviewed By: svcscm Differential Revision: D2559787 Pulled By: foghina fb-gh-sync-id: f188711ec094af3fa307722527f22aefff722e64
This commit is contained in:
committed by
facebook-github-bot-3
parent
71da2917e5
commit
66717d802b
@@ -103,6 +103,10 @@ var ToolbarAndroid = React.createClass({
|
||||
* Callback called when the icon is selected.
|
||||
*/
|
||||
onIconClicked: ReactPropTypes.func,
|
||||
/**
|
||||
* Sets the overflow icon.
|
||||
*/
|
||||
overflowIcon: optionalImageSource,
|
||||
/**
|
||||
* Sets the toolbar subtitle.
|
||||
*/
|
||||
@@ -135,6 +139,9 @@ var ToolbarAndroid = React.createClass({
|
||||
if (this.props.navIcon) {
|
||||
nativeProps.navIcon = resolveAssetSource(this.props.navIcon);
|
||||
}
|
||||
if (this.props.overflowIcon) {
|
||||
nativeProps.overflowIcon = resolveAssetSource(this.props.overflowIcon);
|
||||
}
|
||||
if (this.props.actions) {
|
||||
nativeProps.actions = [];
|
||||
for (var i = 0; i < this.props.actions.length; i++) {
|
||||
@@ -169,6 +176,7 @@ var toolbarAttributes = {
|
||||
actions: true,
|
||||
logo: true,
|
||||
navIcon: true,
|
||||
overflowIcon: true,
|
||||
subtitle: true,
|
||||
subtitleColor: true,
|
||||
title: true,
|
||||
|
||||
Reference in New Issue
Block a user