This library can be used/intergrate in a project as a wrapper for alert messages so that if required to change snackbar to any other lib then can be changed easily without affecting or changes on UI layer.
Dev can use this lib as a bridge between Google snackbar and their application. Flexible to adobt new changes from Snackbar library so that core dev team should focus on delivering the things instead of thinking about library updation or learn/adopt new changes.
Alert.with(context, "Snack bar message").show()
Alert.with(this, "Snackbar with red background")
.backgroundColor(android.R.color.holo_red_dark).show()
Alert.with(this, "Snackbar with red text color")
.textColor(android.R.color.holo_red_dark).show()
Alert.with(this, "Snackbar with 20 seconds")
.textColor(android.R.color.holo_red_dark)
.duration(20000).show()
val hindiFont = Typeface.createFromAsset(assets, "hind_font.ttf")
val snackBarBuilder = Alert.with(this, "Snackbar with hindi font")
.textColor(android.R.color.holo_red_dark)
.font(hindiFont).show()
Alert.with(this, "Snackbar Error Message")
.textColor(R.color.white)
.error().show()
Alert.with(this, "Snackbar success Message")
.textColor(R.color.white)
.success().show()