-
-
Save codeforfun-jp/fc1c15d758c79523f0e671df7a45c30c to your computer and use it in GitHub Desktop.
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("ボタン", new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
// ボタンを押した時の処理 | |
} | |
}) | |
.setBackgroundTint(getResources().getColor(R.color.bg_color)) | |
.setTextColor(getResources().getColor(R.color.msg_color)) | |
.setActionTextColor(getResources().getColor(R.color.btn_color)) | |
.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment