Skip to content

Instantly share code, notes, and snippets.

@ahmmedrejowan
Created October 25, 2022 21:59
Show Gist options
  • Save ahmmedrejowan/699a5eff2c86c3bdbb59558d9b27d62c to your computer and use it in GitHub Desktop.
Save ahmmedrejowan/699a5eff2c86c3bdbb59558d9b27d62c to your computer and use it in GitHub Desktop.
new CuteDialog.withIcon(this)
.setIcon(R.mipmap.ic_launcher)
.setTitle("Simple Dialog")
.setTitleTextSize(20)
.setTitleTextColor(Color.parseColor("#FF4081"))
.setTitleTextStyle(CuteDialog.STYLE_BOLD)
.setDescription("This is a simple Dialog")
.setDescriptionTextColor(Color.parseColor("#FF4081"))
.setDescriptionTextSize(16)
.setDescriptionTextStyle(CuteDialog.STYLE_NORMAL)
.setPositiveButtonText("Okay", v2 -> {
})
.setNegativeButtonText("Cancel", v2 -> {
})
.setCloseIconListener(v2 -> {
})
.setCloseIcon(R.drawable.icon_1)
.setCloseIconColor(Color.parseColor("#FF4081"))
.setCloseIconSize(20)
.setPositiveButtonColor(Color.parseColor("#FF4081"))
.setPositiveButtonRadius(10)
.setPositiveButtonBorderColor(Color.parseColor("#FF4081"))
.setPositiveButtonBorderWidth(2)
.setPositiveButtonTextColor(Color.parseColor("#FFFFFF"))
.setPositiveButtonTextSize(16)
.setPositiveButtonTextStyle(CuteDialog.STYLE_NORMAL)
.setNegativeButtonColor(Color.parseColor("#FFFFFF"))
.setNegativeButtonRadius(10)
.setNegativeButtonBorderColor(Color.parseColor("#FF4081"))
.setNegativeButtonBorderWidth(2)
.setNegativeButtonTextColor(Color.parseColor("#FF4081"))
.setNegativeButtonTextSize(16)
.setNegativeButtonTextStyle(CuteDialog.STYLE_NORMAL)
.setDialogBackgroundColor(Color.parseColor("#FFFFFF"))
.setDialogRadius(10)
.setDialogPosition(CuteDialog.POSITION_CENTER)
.setPadding(20)
.setPrimaryColor(Color.parseColor("#FF4081"))
.isCancelable(true)
.hideNegativeButton(false)
.hidePositiveButton(false)
.hideDescription(false)
.hideTitle(false)
.hideCloseIcon(false)
.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment