Skip to content

Instantly share code, notes, and snippets.

@U-WangE
Last active August 9, 2022 01:09
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 U-WangE/16a7e88c6439666e8a034f6befd0d1f1 to your computer and use it in GitHub Desktop.
Save U-WangE/16a7e88c6439666e8a034f6befd0d1f1 to your computer and use it in GitHub Desktop.
[SnackBar] snackBar를 모듈화 했다.
showSnackBar(binding.root, getString(message)) {
startActivity(Intent().apply {
action = ACTION_APPLICATION_DETAILS_SETTINGS
})
}
fun showSnackBar(view: View, message: String, navigation: () -> Unit) {
Snackbar.make(
view,
message,
Snackbar.LENGTH_INDEFINITE
).apply {
setAction(context.getString("확인")) {
navigation.invoke()
}
show()
}
}
@U-WangE
Copy link
Author

U-WangE commented Aug 9, 2022

Time 0.5D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment