如何在React Native上制作ActionBar?

问题描述 投票:0回答:1

我试图在我的应用程序顶部创建一个操作栏,该栏是我通过Expo创建的。以前,我只使用Android Studio(后者会自动创建栏)。

我尝试使用工具栏组件,该组件未在测试运行中显示

<ToolbarAndroid
  title="Login"
  actions={[{title: 'Settings', show: 'always'}]}/>

通过动作栏,我的意思是下图中的圆圈。我很确定名称是“操作栏”,但我可能错了。

enter image description here

react-native android-actionbar expo
1个回答
0
投票

此问题已解决here

您需要同时指定ToolbarAndroid的宽度和高度。

© www.soinside.com 2019 - 2024. All rights reserved.