This is kind of a dialog. This includes Lottie animations in two different sizes.
- lottie animation
- Support all languages
- Unlimited call fuctions
- Easy Use
- All Dialoges: Welcome, Exit, Warning, Info, Delete, Success
- Easy Theme
- Custom Dialog
Install my-project with https://jitpack.io/
dependencies {
implementation 'com.github.Mori-hub:Lottie-Dialogs:1.0.0'
}
// Call Lib (Small or Large)
val lottieHeader = LottieHeader(this, "large")
// Main Way
lottieHeader.welcome(description: String,
titleOfPositiveButton: String? = null,
positiveButtonFunction: (() β Unit)? = null )
- ButtonFunction : Here you can add your Unit, Method or Calss. (such as Toast)
- null : For any attributes you can put null then use defualt
- Show Dialog: When you call any method this will show, so please ues in side OnClick.
- Colors: A color must be a name ("yellow") or a Hex code ("#DFD3C3")
// Welcome Dialog
findViewById<Button>(R.id.button).setOnClickListener {
lottieHeader.welcome("Hi, Welcome to our app! π")
}
// Exit Dialog
findViewById<Button>(R.id.button2).setOnClickListener {
lottieHeader.exit(
"Goodbye, \n Do you want Exit now?",
null, null, null, this
)
}
// Rate Dialog
findViewById<Button>(R.id.button3).setOnClickListener {
lottieHeader.rate("Hi, Please Rate us! π", null, null, null)
}
// Information Dialog
findViewById<Button>(R.id.button4).setOnClickListener {
lottieHeader.info("This is an App just show Information! π", "info",
{ Toast.makeText(this, "Help me", Toast.LENGTH_SHORT).show() })
}
// Warning Dialog
findViewById<Button>(R.id.button5).setOnClickListener {
lottieHeader.warning("Attention, this is yellow area!", null, null, null)
}
// Delete Dialog
findViewById<Button>(R.id.button6).setOnClickListener {
lottieHeader.del("Do you want delete this file?", null, null, null)
}
// Success Dialog
findViewById<Button>(R.id.button7).setOnClickListener {
lottieHeader.success("The process is successful!", null, null, null)
}
// Editable Dialog
lottieHeader.sample(
"file.json",
"#DFD3C3", "This is a sample you can generate as you want",
"Got it", "Not Sure", "Help me ",
"green", "red", "yellow", "black",
{ Toast.makeText(this, "Got", Toast.LENGTH_SHORT).show() },
{ Toast.makeText(this, "Not", Toast.LENGTH_SHORT).show() },
{ Toast.makeText(this, "Help me", Toast.LENGTH_SHORT).show() }
)
// You set theme for all dialoges
lottieHeader.dialogTheme(
false,
"black",
"gray", "white",
"#9B0000", "yellow"
)
Large Mode
Small Mode
Custom Mode
Apply Black Theme
I'm a full stack developer...find me in google play store
Java, Kotlin, CSS....
Important: For Gradle 7.2 & jitpack.io Please use this way : https://stackoverflow.com/a/71603699/12272687
Update: March 2022
If you have any feedback, please reach out to us at [email protected]