This is kind of a Dialog which is includes simple animations in the header of it.
- Simple animation
- Support all languages
- Unlimited call functions
- Easy Use
- All Dialog: Welcome, Exit, Warning, Info, Delete, Success
- Easy Theme
- Custom Dialog
Install my-project with https://jitpack.io/
dependencies {
implementation 'com.github.Mori-hub:AnimDialog:1.0.13'
}
- build.gradle.kts:
dependencies
{ ...
implementation (libs.anim.dialogs.mori)
}
- libs.version.toml:
[versions]
anim_dialogs="1.0.14"
[libraries]
anim_dialogs_mori = { module = "com.github.Mori-hub:AnimDialog", version.ref = "anim_dialogs" }
// Call Lib (Small or Large)
val animDialog = AnimDialog(this)
// Main Way
animDialog.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
animDialog.welcome("Welcome to this", null, {})
// Exit Dialog
animDialog.exit("Do you want exit?", null, "Cancel", {
Toast.makeText(this, "goodbye", Toast.LENGTH_SHORT).show()
}, this)
// Rate Dialog
animDialog.rate("Do you enjoy it? \n Please rate us", "Rate", "Maybe later")
// Information Dialog
animDialog.info("This message inform you about this", "Got it")
// Warning Dialog
animDialog.warning("Attention! \n You are going in bad way", "Accept", "Ignore", {})
// Delete Dialog
animDialog.del("Do you want Delete it!? \n You will lose this",
"Delete",
"Ignore",
{ Toast.makeText(this, "It's deleted!", Toast.LENGTH_SHORT).show() })
// Editable Dialog
animDialog.simple(
headerImage = android.R.drawable.presence_video_online,
description = "Hi thi is a test",
titleOfPositiveButton = "OK",
titleOfNegativeButton = "Cancel",
positiveButtonFunction = {
Toast.makeText(
this,
"Click on OK",
Toast.LENGTH_SHORT
).show()
},
negativeButtonFunction = {
Toast.makeText(
this,
"Click on Cancel",
Toast.LENGTH_SHORT
).show()
}
)
// You set theme for all dialoges
animDialog.dialogTheme(
true,
"White",
"#DFD3C3", "black",
"#000B49", "yellow"
)
One Header
Two Headers
I'm a full stack developer...find me in Google Play Store
Java, Kotlin, CSS....
Important:
For Gradle 8.4 dependency use TOML Kotlin & jitpack.io Please use this way : https://stackoverflow.com/a/77630488
Update: DeC 2023
If you have any feedback, please reach out to us at ✉️ [email protected]