-
-
Save U-WangE/16a7e88c6439666e8a034f6befd0d1f1 to your computer and use it in GitHub Desktop.
[SnackBar] snackBar를 모듈화 했다.
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
showSnackBar(binding.root, getString(message)) { | |
startActivity(Intent().apply { | |
action = ACTION_APPLICATION_DETAILS_SETTINGS | |
}) | |
} |
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
fun showSnackBar(view: View, message: String, navigation: () -> Unit) { | |
Snackbar.make( | |
view, | |
message, | |
Snackbar.LENGTH_INDEFINITE | |
).apply { | |
setAction(context.getString("확인")) { | |
navigation.invoke() | |
} | |
show() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Time 0.5D