我需要开发一个下拉列表,例如WhatsApp。
这是我的代码试图用工具栏Android做到这一点
<Icon.ToolbarAndroid
titleColor={'#000000'}
style={{
height: 56,
alignSelf: 'stretch',
width: 20
}}
iconColor={"#fff"}
iconSize={26}
rtl={true}
navIconName={"more-vert"}
contentInsetStart={50}
actions={[{title: 'Settings', show: 'always'}, {title: 'Settings 2', show: 'always'}]} />
我不知道工具栏Android是否是我需要的组件,也许如果我知道这种菜单风格的真实名称,我可以在谷歌搜索中更准确。
这是菜单的图像:
我需要做这样的菜单(whatsapp)
只需在此处更改它:
actions={[{title: 'Settings', show: 'never'}, {title: 'Settings 2', show: 'never'}]} />
这在安卓中称为溢出菜单:
操作"显示:"
何时将此操作显示为图标或在溢出菜单中隐藏它: 总是,如果空间或从不
如果设置"从不",它将隐藏在工具栏右侧的溢出菜单图标中。
有关更多信息,请参阅此工具栏Android