我遇到了问题。我正在使用ToolbarAndroid,我希望我的操作出现在溢出菜单中。我发送这样的行为:
actions={this.getToolbarActions()}
getToolbarActions() {
let actions = [];
if (!isEmpty(this.props.authReducer.user)) {
actions.push({
icon: 'exit-to-app',
title: 'LogOut',
onPress: this.logOut,
show: 'never',
});
}
else {
actions.push({
icon: 'account-circle',
title: 'LogIn',
onPress: this.logIn,
show: 'never'
});
}
return actions;
}
但总是会显示行动。我试图将show
设置为always
,ifRoom
,never
- 没有。它总是在那里展示。即使我添加了大约50个动作,它也始终可见。 Some1可以帮助我吗?