question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to change the icon of the ActionButton?

See original GitHub issue

Hi. I am new to react native. So little bit confused about how to change the icon of the ActionButton (not the ActionButton.Item).

<ActionButton buttonColor="rgba(231,76,60,1)" position="center" icon =?? >

</ActionButton>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

2reactions
saddaf88commented, Feb 26, 2018

@jalal246 oh sorry i did not notice that icon is deprecated. did you try

<ActionButton
          buttonColor="rgba(231,76,60,1)"
          ///icon={<Icon name="md-cut" style={styles.actionButtonIcon} />}
          renderIcon={active => active ? (<Icon name="md-cut" style={styles.actionButtonIcon} /> ) : (<Icon name="md-notifications-off" style={styles.actionButtonIcon} />)}>
[your other action button items]
</ActionButton>

before doing it please your action button version. it must be the latest one (2.8.4). It worked for me…

screenshot_20180226-234731 screenshot_20180226-234735

1reaction
7Millioncommented, Nov 19, 2019

@jalal246 oh sorry i did not notice that icon is deprecated. did you try

<ActionButton
          buttonColor="rgba(231,76,60,1)"
          ///icon={<Icon name="md-cut" style={styles.actionButtonIcon} />}
          renderIcon={active => active ? (<Icon name="md-cut" style={styles.actionButtonIcon} /> ) : (<Icon name="md-notifications-off" style={styles.actionButtonIcon} />)}>
[your other action button items]
</ActionButton>

before doing it please your action button version. it must be the latest one (2.8.4). It worked for me…

screenshot_20180226-234731 screenshot_20180226-234735

This one works perfect!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the label or icon of an action button on the client
To remove the current icon, use icon=character(0) . Description. Change the label or icon of an action button on the client. Details. The...
Read more >
r - How to change the order of label and icon within an ...
You can use div ton construct the icon after text: actionButton(inputId = "Next", label = div("Next Page", icon("chevron-right")), ...
Read more >
Change the label or icon of an action button on the client - R
For radioButtons() , checkboxGroupInput() and selectInput() , the set of choices can be cleared by using choices=character(0) .
Read more >
How to Change Icon Color of Floating Action Button in Android?
To change the icon color of Floating Action Button in layout file, set the app:tint attribute with the required color value as shown...
Read more >
Change Floating Action Button Color in Flutter - FlutterBeads
After adding the default Floating Action Button, sometimes you might need to change its colors such as icon color, background color, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found