https://github.com/professordeveloper/dialog-library
Material Dialogs Library
https://github.com/professordeveloper/dialog-library
android-dialog-view android-dialogs android-library dialog dialog-android dialog-custom library-android material-android-dialog material-dialog
Last synced: 5 months ago
JSON representation
Material Dialogs Library
- Host: GitHub
- URL: https://github.com/professordeveloper/dialog-library
- Owner: professorDeveloper
- Created: 2023-03-04T16:36:43.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T10:32:00.000Z (almost 3 years ago)
- Last Synced: 2025-07-17T18:55:14.367Z (5 months ago)
- Topics: android-dialog-view, android-dialogs, android-library, dialog, dialog-android, dialog-custom, library-android, material-android-dialog, material-dialog
- Language: Kotlin
- Homepage:
- Size: 1.92 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dialog-Library
[](https://www.android.com)
[](https://android-arsenal.com/api?level=24)
[](https://www.apache.org/licenses/LICENSE-2.0.html)
## Dependency
Add this to your module's `build.gradle` file:
```gradle
dependencies {
implementation 'com.github.professorDeveloper:Dialog-Library:1.0.3'
}
```
Material Dialog-Library
Wifi Dialog
```kotlin
val dialog = WifiDialog()
dialog.show(supportFragmentManager, "wifi_dialog")
dialog.createDialog("Google wifi", "Pixel 2 A", "i929uui4ui", "Wpa2")
dialog.setonButtonsCLickedListener(object : WifiDialog.WiFiDialogListeners {
override fun okButtonClicked(password: String) {
Toast.makeText(this@MainActivity, "$password", Toast.LENGTH_SHORT).show()
}
override fun cancelButtonClicked() {}
})
```
Color Dialog
```kotlin
val dialog = ColorDialog()
dialog.show(supportFragmentManager, "color_dialog")
dialog.setOnColorSelectedListener(object : ColorDialog.OnColorSelectListener {
override fun OnColorSelected(color: Int) {
binding.colorsheetDialog.setBackgroundColor(color)
}
})
```
Dialog Bassic
```kotlin
val basicDialog = BasicDialog(this)
basicDialog.createDialog(
title = "Lorem ipsum?",
mainTxt = "Lorem ipsum dolor sit amet, consectetur adipiscing elit," +
"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
okBtnTxt = "Agree",
cancelBtnTxt = "Disagree"
)
basicDialog.show(supportFragmentManager, "basic_dialog")
basicDialog.setOnButtonClickListener(object : BasicDialog.BasicDialogListeners {
override fun okButtonClicked() {
Toast.makeText(this@MainActivity, "DISAGREE", Toast.LENGTH_SHORT).show()
}
override fun cancelButtonClicked() {
Toast.makeText(this@MainActivity, "AGREE", Toast.LENGTH_SHORT).show()
}
})
```
Date Dialog
```kotlin
val dialog = DateAndTimeDialog()
dialog.show(supportFragmentManager, "date_dialog")
dialog.setOnOkButtonClicked(object : DateAndTimeDialog.OnButtonClicked {
@RequiresApi(Build.VERSION_CODES.M)
override fun OnOkButtonClicked(datePicker: DatePicker, timePicker: TimePicker) {
val date = "${datePicker.dayOfMonth}.${datePicker.month}.${datePicker.year} " +
"${timePicker.hour}:${timePicker.minute}"
Toast.makeText(this@MainActivity, date, Toast.LENGTH_SHORT).show()
}
})
```
## Screenshot

## License
* [Apache Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
```
Copyright 2020 ProfessorDveloper Library
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.