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 color of action in Snackbar?

See original GitHub issue

How to change the color of action in Snackbar?

Hi guys ! Help to understand how to change the color of the action in Snackbar ?

         <Snackbar
           visible={this.state.visible}
          onDismiss={() => this.setState({ visible: false })}
          action={{
            
            label: "Undo",
            onPress: () => this.setState({ isHidden: true })}}>
          You are registered on {namefilm}
        </Snackbar>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

38reactions
Trancevercommented, Mar 14, 2019

You can change it via theme prop:

theme={{ colors: { accent: 'red' }}}
12reactions
robertherbercommented, Aug 20, 2019

Hmm, this doesn’t feel quite right. Why doesn’t the Context-provided theme apply to this specific component?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Snackbar action text color not changing - Stack Overflow
The argument of setActionTextColor is the int that represents the color, not the resource ID. Instead of this:
Read more >
Kotlin Android Snackbar - Change Text Color ... - Tutorial Kart
1. To change Snackbar's Text Color. snack.view.setBackgroundColor(Color.parseColor("#FFFFFF")) · 2. To change Snackbar's Background Color val textView = snack.
Read more >
Android Kotlin - Change Snackbar Text and Background Color
To change text, action button, and background color of the Snackbar we are going to use of setTextColor(), setActionTextColor(),and ...
Read more >
Theming Material Design Snackbars in Android with Example
in this case the action button color inside the snackbar is set to red-->. < style name = "Widget.App.SnackbarButton" parent = "Widget.
Read more >
SnackbarDefaults - Android Developers
Default background color of the Snackbar · Color · primaryActionColor ... You can adjust your privacy controls anytime in your Google settings.
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