Closed erjdriver closed 7 years ago
Yep it's possible. I haven't implemented it, will likely add later this week to the plugin.
This is what will be added and an option added to the snackbar options interface:
if (options.backgroundColor && Color.isValid(options.backgroundColor)) {
let sbView = this._snackbar.getView();
sbView.setBackgroundColor(options.backgroundColor.android);
}
This might not be 100% accurate but it's something like that. Thanks for opening the issue, good option to provide 👍
Thanks Brad - that'll be a good addition and look forward to that addition.
Still haven't forgotten about this, just haven't been on mobile in a week. Maybe later this week I'll be back on mobile stuff and will make a quick update and publish the new version.
@Brad - while you're in the "looking process" - how about the ability to set a css-class.
or return the view and let user do something with that top-level view.
Maybe the implementation would not make it possible - but just a suggestion.
¯\_(ツ)_/¯
@erjdriver Hi, you can now change background color (android only at this moment)
1.2.0 published to npm, thanks to @davorpeic 🎉
Can the background color be changed?
In my app - I use nativescript-themes to allow changing of themes and in the dark theme a different background color for the snackbar is desirable.
Thanks.