From 56a9cf15ed1260497305ed939d16e61b412b09ea Mon Sep 17 00:00:00 2001 From: ahmmedrejowan Date: Wed, 21 Sep 2022 20:41:16 +0600 Subject: [PATCH] Reworking design and functions --- .../github/cutelibs/cutedialog/CuteDialog.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CuteDialog/src/main/java/io/github/cutelibs/cutedialog/CuteDialog.java b/CuteDialog/src/main/java/io/github/cutelibs/cutedialog/CuteDialog.java index 90124b5..797cc43 100644 --- a/CuteDialog/src/main/java/io/github/cutelibs/cutedialog/CuteDialog.java +++ b/CuteDialog/src/main/java/io/github/cutelibs/cutedialog/CuteDialog.java @@ -350,7 +350,7 @@ public CuteDialog setDesc(String descText, int textSizeInSP, int textColor, int return this; } - public CuteDialog setPositiveButtonStyle(int radiusOfButton, int bgColorOfButton, int outlineOfButton, int borderWidth, int textSizeInSP) { + public CuteDialog setPositiveButtonStyle(int radiusOfButton, int bgColorOfButton, int borderColor, int borderWidth, int textSizeInSP) { if (radiusOfButton != 0) { binding.positiveButton.setRadius(radiusOfButton * 4); @@ -364,11 +364,11 @@ public CuteDialog setPositiveButtonStyle(int radiusOfButton, int bgColorOfButton } } - if (outlineOfButton != 0) { + if (borderColor != 0) { try { - binding.positiveButton.setStrokeColor(ContextCompat.getColor(context, outlineOfButton)); + binding.positiveButton.setStrokeColor(ContextCompat.getColor(context, borderColor)); } catch (Resources.NotFoundException e) { - binding.positiveButton.setStrokeColor(outlineOfButton); + binding.positiveButton.setStrokeColor(borderColor); } } else { if (bgColorOfButton != 0) { @@ -393,7 +393,7 @@ public CuteDialog setPositiveButtonStyle(int radiusOfButton, int bgColorOfButton return this; } - public CuteDialog setNegativeButtonStyle(int radiusOfButton, int bgColorOfButton, int outlineOfButton, int borderWidth, int textSizeInSP) { + public CuteDialog setNegativeButtonStyle(int radiusOfButton, int bgColorOfButton, int borderColor, int borderWidth, int textSizeInSP) { if (radiusOfButton != 0) { binding.negativeButton.setRadius(radiusOfButton * 4); @@ -408,11 +408,11 @@ public CuteDialog setNegativeButtonStyle(int radiusOfButton, int bgColorOfButton } } - if (outlineOfButton != 0) { + if (borderColor != 0) { try { - binding.negativeButton.setStrokeColor(ContextCompat.getColor(context, outlineOfButton)); + binding.negativeButton.setStrokeColor(ContextCompat.getColor(context, borderColor)); } catch (Resources.NotFoundException e) { - binding.negativeButton.setStrokeColor(outlineOfButton); + binding.negativeButton.setStrokeColor(borderColor); } } else { if (bgColorOfButton != 0) {