Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Ido-Barnea committed Apr 23, 2022
2 parents 9d9a6b7 + 35c6f7c commit 89ab374
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,33 @@ A simple library to help developers create beautiful alert dialogs
> Step 2: Add the dependency
```gradle
dependencies {
implementation 'com.github.Ido-Barnea:Dialoger:1.1.3'
implementation 'com.github.Ido-Barnea:Dialoger:1.1.4'
}
```
That's it!

# :fast_forward: Quick use
```kotlin
val dialog = Dialoger(this, Dialoger.TYPE_LOADING)
.setTitle("This is a loading dialog...")
.setText("This might take a while...")
.setProgressBarColor("#7acf19")
.setDrawable(R.drawable.ic_launcher_background)
.setGravity(Gravity.START)
.show()
val dialog = Dialoger(this, Dialoger.TYPE_LOADING)
.setTitle("This is a loading dialog...")
.setDescription("This might take a while...")
.setProgressBarColor(R.color.purple_200)
.show()

// dismiss the dialog after 3 seconds
val handler = Handler()
handler.postDelayed({
dialog.dismiss()
// dismiss the dialog after 3 seconds
Handler().postDelayed({
dialog.dismiss()

Dialoger(this, Dialoger.TYPE_SUCCESS)
.setTitle("New Dialog!")
.setText("This was an amazing success!")
.setButtonText("ALLONS-Y!")
.setDialogWidth(DialogAlerter.WIDTH_LARGE)
.setButtonOnClickListener {
Toast.makeText(this, "dialog button clicked", Toast.LENGTH_SHORT).show()
}
.show()
}, 3000)
Dialoger(this, Dialoger.TYPE_MESSAGE)
.setDialogColorTheme(R.color.green)
.setTitle("New Dialog!")
.setDescription("This was an amazing success!")
.setButtonText("ALLONS-Y!")
.setButtonOnClickListener {
Toast.makeText(this, "dialog button clicked", Toast.LENGTH_SHORT).show()
}
.show()
}, 3000)
```

# :book: Dialog Types:
Expand Down

0 comments on commit 89ab374

Please sign in to comment.