📦 CustomToastMessage
A beautifully customizable Snackbar library for Android built with Kotlin. Easily show snack messages with icons, actions, borders, colors, and much more — all with a single builder call.
🚀 Dependency
Add this to your module build.gradle:
implementation 'com.github.vaishaliichandel:CustomToastMessage:1.0.0'Ensure JitPack is included in your project-level settings.gradle.kts:
dependencyResolutionManagement {
repositories {
maven { url = uri("https://jitpack.io") }
}
}⚡️ How to Use
Snacking.Builder(view, "Your message here")
.build()
.show()🍭 Features & Examples
✅ Basic Snackbar
Snacking.Builder(rootView, "Hello! this is basic message")
.build()
.show()✨ Elevation
.elevation(5F)🛠 Icon with Tint
.icon(R.drawable.ic_info, R.color.teal_200) or .icon(R.drawable.ic_info,"#00594A") 🧲 Action Button with custom color
.action("Dismiss", R.color.teal_200, object : Snacking.Callback {
override fun onActionClick(snackBar: Snacking?) {
snackBar?.dismiss()
}
})❌ Close Icon
.actionClose(R.drawable.ic_close, R.color.teal_200, object : Snacking.Callback {
override fun onActionClick(snackBar: Snacking?) {
snackBar?.dismiss()
}
})🎯 Corner Radius
.cornerRadius(30F)🧩 Custom Corner Radius
.cornerRadius(15f, 0f, 0f, 15f)📏 Border with Color
.border(2F, R.color.colorPrimary)
.cornerRadius(10F)🎨 Background Color
.backgroundColor(R.color.purple_200)🌈 Text Color
.textColor(R.color.teal_200)🆎 Font Style & Family
.fontFamily(R.font.montserrat)
.textStyle(Snacking.BOLD_ITALIC)🧭 Top Position
.position(Snacking.TOP)📏 Max Lines
.messageMaxLines(2)⏳ INDEFINITE Duration
.duration(Snacking.INDEFINITE)🧼 Remove Margin
.removeMargin()📸 Check out Video for examples
https://github.com/user-attachments/assets/09c2d332-cabe-4ee7-b347-43731dc75013💡 Contribution
Feel free to fork, open issues, or submit pull requests. Show some ❤️ by giving this repo a ⭐!
👩💻 Developer
Vaishali Chandel