Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@codeforfun-jp
Created August 27, 2021 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeforfun-jp/f1e921974a257f25cd1574bfc0e231dd to your computer and use it in GitHub Desktop.
Save codeforfun-jp/f1e921974a257f25cd1574bfc0e231dd to your computer and use it in GitHub Desktop.
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