![](https://raw.githubusercontent.com/karthikkompelli/PeekAlert/main/./arts/logo.svg)
PeekAlert
A Lightweight and Highly-customizable alert library
PeekAlert can be used on both Java and Kotlin.
See the examples below for more info.
✔ Any PRs are welcome!
Demo
Installation (Gradle)
- Add jitpack url
Kotlin DSL:
repositories {
/* ... */
maven(url = "https://jitpack.io")
}
Groovy DSL:
repositories {
/* ... */
maven { url 'https://jitpack.io' }
}
dependencies {
implementation("com.github.mooner1022:PeekAlert:<VERSION>")
}
Usage
Basic usages
Java
PeekAlert peekAlert = PeekAlert.create(this)
.setDraggable(true)
.setTitle("Hello, PeekAlert!")
.setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
peekAlert.peek();
Kotlin
val peekAlert = PeekAlert.create(this)
.setDraggable(true)
.setTitle("Hello, PeekAlert!")
.setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
peekAlert.peek()
Builder for kotlin is also available:
createPeekAlert(this) {
draggable = true
title("Hello, PeekAlert Builder!") {
textColor(res = R.color.black)
}
text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.") {
textSize = 14f
}
}.peek()
Custom
To be documented...