mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
* Update AboutActivity to use DialogUtil * Update ProfileActivity to use DialogUtil * Update AchievementsFragment to use DialogUtil * Remove wrong message set in ProfileActivity * Update DialogUtil to accept null instead of empty string
This commit is contained in:
parent
968911db32
commit
20100c4960
4 changed files with 64 additions and 65 deletions
|
|
@ -34,8 +34,8 @@ object DialogUtil {
|
|||
@JvmStatic
|
||||
fun showAlertDialog(
|
||||
activity: Activity,
|
||||
title: String,
|
||||
message: String,
|
||||
title: String?,
|
||||
message: String?,
|
||||
onPositiveBtnClick: Runnable?,
|
||||
onNegativeBtnClick: Runnable?
|
||||
) {
|
||||
|
|
@ -53,8 +53,8 @@ object DialogUtil {
|
|||
@JvmStatic
|
||||
fun showAlertDialog(
|
||||
activity: Activity,
|
||||
title: String,
|
||||
message: String,
|
||||
title: String?,
|
||||
message: String?,
|
||||
positiveButtonText: String?,
|
||||
negativeButtonText: String?,
|
||||
onPositiveBtnClick: Runnable?,
|
||||
|
|
@ -74,8 +74,8 @@ object DialogUtil {
|
|||
@JvmStatic
|
||||
fun showAlertDialog(
|
||||
activity: Activity,
|
||||
title: String,
|
||||
message: String,
|
||||
title: String?,
|
||||
message: String?,
|
||||
onPositiveBtnClick: Runnable?,
|
||||
onNegativeBtnClick: Runnable?,
|
||||
customView: View?,
|
||||
|
|
@ -97,8 +97,8 @@ object DialogUtil {
|
|||
@JvmStatic
|
||||
fun showAlertDialog(
|
||||
activity: Activity,
|
||||
title: String,
|
||||
message: String,
|
||||
title: String?,
|
||||
message: String?,
|
||||
positiveButtonText: String?,
|
||||
negativeButtonText: String?,
|
||||
onPositiveBtnClick: Runnable?,
|
||||
|
|
@ -122,8 +122,8 @@ object DialogUtil {
|
|||
@JvmStatic
|
||||
fun showAlertDialog(
|
||||
activity: Activity,
|
||||
title: String,
|
||||
message: String,
|
||||
title: String?,
|
||||
message: String?,
|
||||
positiveButtonText: String?,
|
||||
onPositiveBtnClick: Runnable?,
|
||||
cancelable: Boolean
|
||||
|
|
@ -152,8 +152,8 @@ object DialogUtil {
|
|||
*/
|
||||
private fun createAndShowDialogSafely(
|
||||
activity: Activity,
|
||||
title: String,
|
||||
message: String,
|
||||
title: String?,
|
||||
message: String?,
|
||||
positiveButtonText: String? = null,
|
||||
negativeButtonText: String? = null,
|
||||
onPositiveBtnClick: Runnable? = null,
|
||||
|
|
@ -171,8 +171,8 @@ object DialogUtil {
|
|||
}
|
||||
|
||||
showSafely(activity, AlertDialog.Builder(activity).apply {
|
||||
setTitle(title)
|
||||
setMessage(message)
|
||||
title?.also{setTitle(title)}
|
||||
title?.also{setMessage(message)}
|
||||
setView(customView)
|
||||
setCancelable(cancelable)
|
||||
positiveButtonText?.let {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue