Skip to content

Commit 94937c5

Browse files
New Version v20.2.2
1 parent 42a638b commit 94937c5

File tree

32 files changed

+40
-20
lines changed

32 files changed

+40
-20
lines changed
Binary file not shown.
Binary file not shown.

.gradle/7.4/fileHashes/fileHashes.bin

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
170 Bytes
Binary file not shown.
Binary file not shown.

.gradle/file-system.probe

0 Bytes
Binary file not shown.

.idea/workspace.xml

Lines changed: 3 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
![](https://github.com/TutorialsAndroid/KAlertDialog/blob/master/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png)
22

3-
# New version released v20.2.1 on 18-10-2022
3+
# New version released v20.2.2 on 18-10-2022
44
## Changelogs
55
- Fixed issue in button not changing color in NORMAL_TYPE dialog
6+
- Now you can hide confirm and cancel button on alert dialog type change
67
### Read the changes in README
78

89
Alert Dialog ![API](https://img.shields.io/badge/API-19%2B-brightgreen.svg?style=flat) [![Known Vulnerabilities](https://snyk.io/test/github/TutorialsAndroid/KAlertDialog/badge.svg?targetFile=library%2Fbuild.gradle)](https://snyk.io/test/github/TutorialsAndroid/KAlertDialog?targetFile=library%2Fbuild.gradle) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-KAlertDiaog-blue.svg?style=flat)](https://android-arsenal.com/details/1/7588) [![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
@@ -67,7 +68,7 @@ Add it in your root build.gradle at the end of repositories:
6768
Step 2. Add the dependency
6869

6970
dependencies {
70-
implementation 'com.github.TutorialsAndroid:KAlertDialog:v20.2.1'
71+
implementation 'com.github.TutorialsAndroid:KAlertDialog:v20.2.2'
7172
}
7273

7374
## Usage
@@ -336,6 +337,26 @@ And if you want to hide Title Text and Content Text of alert dialog
336337
.setTitleText("Are you sure?") //just don't write this line if you want to hide title text
337338
.setContentText("Won't be able to recover this file!") // don't write this line if you want to hide content text
338339

340+
And if you want to hide Title Text and Content Text on alert type change
341+
342+
new KAlertDialog(this, KAlertDialog.WARNING_TYPE)
343+
.setTitleText("Are you sure?")
344+
.setContentText("Won't be able to recover this file!")
345+
.showCancelButton(true)
346+
.setCancelClickListener("No,cancel plx!", sDialog ->
347+
sDialog.setTitleText(null)
348+
.setContentText("Your imaginary file is safe :)")
349+
.showCancelButton(false)
350+
.setConfirmClickListener("OK", null)
351+
.changeAlertType(KAlertDialog.ERROR_TYPE))
352+
.setConfirmClickListener("Yes,delete it!",sDialog ->
353+
sDialog.setTitleText("Deleted!")
354+
.showCancelButton(false)
355+
.setContentText(null)
356+
.setConfirmClickListener("OK",null)
357+
.changeAlertType(KAlertDialog.SUCCESS_TYPE))
358+
.show();
359+
339360
**Change** the dialog style upon confirming:
340361

341362
new KAlertDialog(this, KAlertDialog.WARNING_TYPE, 0)

0 commit comments

Comments
 (0)