Juan Arze
Juan Arze

Reputation: 75

react native toolbar android with dropdown like, for example, whatsapp

i need develop a dropdown like, for example, whatsapp.

This is my code trying to do it with ToolbarAndroid

<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'}]} />

I dont know if ToolbarAndroid is the component what i need, maybe if i know the real name of this style of menu i can be more accurate in google searchs.

Here an image of the menu:

I need do a menu like this (whatsapp)

Upvotes: 1

Views: 976

Answers (1)

Sagar Chavada
Sagar Chavada

Reputation: 5269

just change it here:

actions={[{title: 'Settings', show: 'never'}, {title: 'Settings 2', show: 'never'}]} />

This is called overflow menu in android:

Action "Show:"

when to show this action as an icon or hide it in the overflow menu: always, ifRoom or never

if you set never, it will hide in overflow menu icon at the right side of toolbar.

For more information see this ToolbarAndroid

Upvotes: 1

Related Questions