diff --git a/SamsungPay/build.gradle b/SamsungPay/build.gradle index 84c402c441..bb1fb3b44d 100644 --- a/SamsungPay/build.gradle +++ b/SamsungPay/build.gradle @@ -37,6 +37,7 @@ dependencies { api project(':Card') api deps.samsungPay + implementation deps.annotation testImplementation deps.robolectric testImplementation deps.junitTest diff --git a/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2BaseCustomization.java b/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2BaseCustomization.java index 8455575ffe..b531ad9953 100644 --- a/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2BaseCustomization.java +++ b/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2BaseCustomization.java @@ -5,17 +5,15 @@ import androidx.annotation.Nullable; -import com.cardinalcommerce.shared.userinterfaces.Customization; - /** * Base customization options for 3D Secure 2 flows. */ +// TODO: Deprecate public class ThreeDSecureV2BaseCustomization implements Parcelable { private String textFontName; private String textColor; private int textFontSize; - protected Customization cardinalValue; ThreeDSecureV2BaseCustomization() {} @@ -24,7 +22,6 @@ public class ThreeDSecureV2BaseCustomization implements Parcelable { */ public void setTextFontName(@Nullable String textFontName) { this.textFontName = textFontName; - cardinalValue.setTextFontName(textFontName); } /** @@ -32,7 +29,6 @@ public void setTextFontName(@Nullable String textFontName) { */ public void setTextColor(@Nullable String textColor) { this.textColor = textColor; - cardinalValue.setTextColor(textColor); } /** @@ -40,7 +36,6 @@ public void setTextColor(@Nullable String textColor) { */ public void setTextFontSize(int textFontSize) { this.textFontSize = textFontSize; - cardinalValue.setTextFontSize(textFontSize); } /** diff --git a/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2ButtonCustomization.java b/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2ButtonCustomization.java index e79019c0af..8ed9f282f2 100644 --- a/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2ButtonCustomization.java +++ b/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2ButtonCustomization.java @@ -17,7 +17,50 @@ public class ThreeDSecureV2ButtonCustomization extends ThreeDSecureV2BaseCustomi private final ButtonCustomization cardinalButtonCustomization = new ButtonCustomization(); public ThreeDSecureV2ButtonCustomization() { - super.cardinalValue = cardinalButtonCustomization; + } + + /** + * @param textFontName Font type for the UI element. + */ + public void setTextFontName(@Nullable String textFontName) { + cardinalButtonCustomization.setTextFontName(textFontName); + } + + /** + * @param textColor Color code in Hex format. For example, the color code can be “#999999”. + */ + public void setTextColor(@Nullable String textColor) { + cardinalButtonCustomization.setTextColor(textColor); + } + + /** + * @param textFontSize Font size for the UI element. + */ + public void setTextFontSize(int textFontSize) { + cardinalButtonCustomization.setTextFontSize(textFontSize); + } + + /** + * @return Font type for the UI element. + */ + @Nullable + public String getTextFontName() { + return cardinalButtonCustomization.getTextFontName(); + } + + /** + * @return Color code in Hex format. + */ + @Nullable + public String getTextColor() { + return cardinalButtonCustomization.getTextColor(); + } + + /** + * @return Font size for the UI element. + */ + public int getTextFontSize() { + return cardinalButtonCustomization.getTextFontSize(); } /** diff --git a/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2LabelCustomization.java b/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2LabelCustomization.java index 4f96b95f94..17e57392ed 100644 --- a/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2LabelCustomization.java +++ b/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2LabelCustomization.java @@ -18,7 +18,50 @@ public class ThreeDSecureV2LabelCustomization extends ThreeDSecureV2BaseCustomiz private final LabelCustomization cardinalLabelCustomization = new LabelCustomization(); public ThreeDSecureV2LabelCustomization() { - super.cardinalValue = cardinalLabelCustomization; + } + + /** + * @param textFontName Font type for the UI element. + */ + public void setTextFontName(@Nullable String textFontName) { + cardinalLabelCustomization.setTextFontName(textFontName); + } + + /** + * @param textColor Color code in Hex format. For example, the color code can be “#999999”. + */ + public void setTextColor(@Nullable String textColor) { + cardinalLabelCustomization.setTextColor(textColor); + } + + /** + * @param textFontSize Font size for the UI element. + */ + public void setTextFontSize(int textFontSize) { + cardinalLabelCustomization.setTextFontSize(textFontSize); + } + + /** + * @return Font type for the UI element. + */ + @Nullable + public String getTextFontName() { + return cardinalLabelCustomization.getTextFontName(); + } + + /** + * @return Color code in Hex format. + */ + @Nullable + public String getTextColor() { + return cardinalLabelCustomization.getTextColor(); + } + + /** + * @return Font size for the UI element. + */ + public int getTextFontSize() { + return cardinalLabelCustomization.getTextFontSize(); } /** diff --git a/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2TextBoxCustomization.java b/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2TextBoxCustomization.java index cb6fae1a21..1e026fdd6d 100644 --- a/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2TextBoxCustomization.java +++ b/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2TextBoxCustomization.java @@ -18,7 +18,50 @@ public class ThreeDSecureV2TextBoxCustomization extends ThreeDSecureV2BaseCustom private final TextBoxCustomization cardinalTextBoxCustomization = new TextBoxCustomization(); public ThreeDSecureV2TextBoxCustomization() { - super.cardinalValue = cardinalTextBoxCustomization; + } + + /** + * @param textFontName Font type for the UI element. + */ + public void setTextFontName(@Nullable String textFontName) { + cardinalTextBoxCustomization.setTextFontName(textFontName); + } + + /** + * @param textColor Color code in Hex format. For example, the color code can be “#999999”. + */ + public void setTextColor(@Nullable String textColor) { + cardinalTextBoxCustomization.setTextColor(textColor); + } + + /** + * @param textFontSize Font size for the UI element. + */ + public void setTextFontSize(int textFontSize) { + cardinalTextBoxCustomization.setTextFontSize(textFontSize); + } + + /** + * @return Font type for the UI element. + */ + @Nullable + public String getTextFontName() { + return cardinalTextBoxCustomization.getTextFontName(); + } + + /** + * @return Color code in Hex format. + */ + @Nullable + public String getTextColor() { + return cardinalTextBoxCustomization.getTextColor(); + } + + /** + * @return Font size for the UI element. + */ + public int getTextFontSize() { + return cardinalTextBoxCustomization.getTextFontSize(); } /** diff --git a/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2ToolbarCustomization.java b/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2ToolbarCustomization.java index fbfbbca839..702f0444bc 100644 --- a/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2ToolbarCustomization.java +++ b/ThreeDSecure/src/main/java/com/braintreepayments/api/ThreeDSecureV2ToolbarCustomization.java @@ -18,7 +18,50 @@ public class ThreeDSecureV2ToolbarCustomization extends ThreeDSecureV2BaseCustom private final ToolbarCustomization cardinalToolbarCustomization = new ToolbarCustomization(); public ThreeDSecureV2ToolbarCustomization() { - super.cardinalValue = cardinalToolbarCustomization; + } + + /** + * @param textFontName Font type for the UI element. + */ + public void setTextFontName(@Nullable String textFontName) { + cardinalToolbarCustomization.setTextFontName(textFontName); + } + + /** + * @param textColor Color code in Hex format. For example, the color code can be “#999999”. + */ + public void setTextColor(@Nullable String textColor) { + cardinalToolbarCustomization.setTextColor(textColor); + } + + /** + * @param textFontSize Font size for the UI element. + */ + public void setTextFontSize(int textFontSize) { + cardinalToolbarCustomization.setTextFontSize(textFontSize); + } + + /** + * @return Font type for the UI element. + */ + @Nullable + public String getTextFontName() { + return cardinalToolbarCustomization.getTextFontName(); + } + + /** + * @return Color code in Hex format. + */ + @Nullable + public String getTextColor() { + return cardinalToolbarCustomization.getTextColor(); + } + + /** + * @return Font size for the UI element. + */ + public int getTextFontSize() { + return cardinalToolbarCustomization.getTextFontSize(); } /** diff --git a/gradle.properties b/gradle.properties index 735d67f311..42db5ad8c9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,3 @@ -android.enableJetifier=true android.useAndroidX=true # Ref: https://stackoverflow.com/a/50673210