프로젝트
GitHub에서 보기







chnouman/AwesomeDialog
소개
A Beautiful Dialog Library for Kotlin Android
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalAwesome Dialog - A Beautiful Dialogs Library for Android Kotlin 🤩🔥
A Beautiful Multipurpose Awesome Dialogs Library in Android using Kotlin 😍
About
A Beautiful Multipurpose Awesome Dialogs Library in Android using Kotlin.
Dependency Project Level
Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Dependency App Level
Add dependency in your app module
dependencies {
implementation 'com.github.chnouman:AwesomeDialog:1.0.5'
}
Simple Dialog 🖐🏼
AwesomeDialog.build(this)
.title("Congratulations")
.body("Your New Account has been created")
.onPositive("Go To My Account") {
Log.d("TAG", "positive ")
}
Dialog With Icon ⌛️
AwesomeDialog.build(this)
.title("Congratulations")
.body("Your New Account has been created")
.icon(R.drawable.ic_congrts)
.onPositive("Go To My Account") {
Log.d("TAG", "positive ")
}
Usage
Sample Code for 🌟
Icon+Title+Body
AwesomeDialog.build(this)
.title(title)
.body(body)
.icon(R.drawable.ic_congrts)
Output

Icon+Title+Body+ (+ Button)
AwesomeDialog.build(this)
.title(title)
.body(body)
.icon(R.drawable.ic_congrts)
.onPositive(goToMyAccount) {
Log.d("TAG", "positive ")
}
Output

Icon+Title+Body+ (+/- Button)
AwesomeDialog.build(this)
.title(title)
.body(body)
.icon(R.drawable.ic_congrts)
.onPositive(goToMyAccount) {
Log.d("TAG", "positive ")
}
.onNegative(cancel) {
Log.d("TAG", "negative ")
}
Output

Title+Body+ (- Button)
AwesomeDialog.build(this)
.title(title)
.body(body)
.onPositive(goToMyAccount) {
Log.d("TAG", "positive ")
}
Output

Title+Body+ (+/- Button)
AwesomeDialog.build(this)
.title(title)
.body(body)
.onPositive(goToMyAccount) {
Log.d("TAG", "positive ")
}
.onNegative(cancel) {
Log.d("TAG", "negative ")
}
Output

Title+Body+ (+/- Button) With Backgroud 🌈
AwesomeDialog.build(this)
.title(
title,
titleColor = ContextCompat.getColor(this, android.R.color.white)
)
.body(
body,
color = ContextCompat.getColor(this, android.R.color.white)
)
.background(R.drawable.layout_rounded_dark_black)
.onPositive(goToMyAccount) {
Log.d("TAG", "positive ")
}
.onNegative(cancel) {
Log.d("TAG", "negative ")
}
Output

Custom Coloring 🌈
AwesomeDialog.build(this)
.title(
title,
titleColor = ContextCompat.getColor(this, android.R.color.white)
)
.body(
body,
color = ContextCompat.getColor(this, android.R.color.white)
)
.icon(R.drawable.ic_congrts)
.background(R.drawable.layout_rounded_green)
.onPositive(
goToMyAccount,
buttonBackgroundColor = R.drawable.layout_rounded_dark_white,
textColor = ContextCompat.getColor(this, android.R.color.black)
) {
Log.d("TAG", "positive ")
}
Output

Positioning
We can customize the Position of Dialog.
POSITIONS.CENTER
POSITIONS.BOTTOM
By Default Position is Bottom.
| CENTER | BOTTOM |
|---|---|
![]() |
![]() |
Awesome Attributes Properties
title()
| Parameter | Type | Default Value |
|---|---|---|
| title | String | Empty String |
| fontStyle | TypeFace | Android Default |
| titleColor | Int | Android Default Color |
body()
| Parameter | Type | Default Value. |
|---|---|---|
| body | String | Empty String. |
| fontStyle | Typeface | Android Default. |
| color | Int | Android Default Text Color. |
icon()
| Parameter | Type | Default Value |
|---|---|---|
| icon | Int | Not Null |
| animateIcon | Boolean | false |
position()
| Parameter | Type | Default Value |
|---|---|---|
| position | POSITIONS | POSITIONS.BOTTOM |
background()
| Parameter | Type | Default Value |
|---|---|---|
| dialogBackgroundColor | INT | DEFAULT |
onPositive()
| Parameter | Type | Default Value |
|---|---|---|
| text | String | Empty String |
| buttonBackgroundColor | Int | Default Color |
| action | () -> Unit | Empty |
onNegative()
| Parameter | Type | Default Value |
|---|---|---|
| text | String | Empty String |
| buttonBackgroundColor | Int | Default Color |
| action | () -> Unit | Empty |
License
Copyright 2020 Muhammad Nouman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
관련 프로젝트 살펴보기
불러오는 중…

