-
-
Save codeforfun-jp/f1e921974a257f25cd1574bfc0e231dd to your computer and use it in GitHub Desktop.
Kotlin - How to change colors of Snackbar 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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