File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/main/java/org/buffer/android/components Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ publish {
36
36
userOrg = ' buffer'
37
37
groupId = ' org.buffer.android'
38
38
artifactId = ' android-components'
39
- publishVersion = ' 0.11 '
39
+ publishVersion = ' 0.12 '
40
40
desc = ' An Android library for frequently used UI components'
41
41
website = ' https://github.com/bufferapp/android-components'
42
42
}
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ object DialogFactory {
38
38
neutralListener : View .OnClickListener ? = null
39
39
): AlertDialog {
40
40
val view = LayoutInflater .from(context).inflate(R .layout.dialog_whats_new, null )
41
+ val alert = AlertDialog .Builder (context).setView(view).create()
41
42
42
43
title?.let {
43
44
view.titleText.text = context.getString(title)
@@ -67,6 +68,7 @@ object DialogFactory {
67
68
view.positiveButton.text = context.getString(positive)
68
69
view.positiveButton.setOnClickListener {
69
70
positiveListener?.onClick(view.positiveButton)
71
+ alert.dismiss()
70
72
}
71
73
} ? : run {
72
74
view.positiveButton.visibility = View .GONE
@@ -76,12 +78,13 @@ object DialogFactory {
76
78
view.neutralButton.text = context.getString(neutral)
77
79
view.neutralButton.setOnClickListener {
78
80
neutralListener?.onClick(view.neutralButton)
81
+ alert.dismiss()
79
82
}
80
83
} ? : run {
81
84
view.neutralButton.visibility = View .GONE
82
85
}
83
86
84
- return AlertDialog . Builder (context).setView(view).create()
87
+ return alert
85
88
}
86
89
87
90
fun createSimpleYesNoDialog (
You can’t perform that action at this time.
0 commit comments