Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created Aug 27, 2021
Embed
What would you like to do?
Kotlin - How to change colors of Snackbar 2
Snackbar.make(view, "ここにメッセージを表示します", Snackbar.LENGTH_SHORT)
.setAction("ボタン") {
// ボタンを押した時の処理
}
.setBackgroundTint(resources.getColor(R.color.bg_color))
.setTextColor(resources.getColor(R.color.msg_color))
.setActionTextColor(resources.getColor(R.color.btn_color))
.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment