Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Deprecated annotation to old primaryButtonColor api #5061

Merged
merged 2 commits into from May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,4 +1,8 @@
# CHANGELOG
## XX.X.X - 2022-XX-XX

### PaymentSheet
* [DEPRECATED][5061](https://github.com/stripe/stripe-android/pull/5061) Add Deprecated annotation to old primaryButtonColor api.

## 20.4.0 - 2022-05-23
This release adds [appearance customization APIs](https://github.com/stripe/stripe-android/blob/master/paymentsheet/src/main/java/com/stripe/android/paymentsheet/PaymentSheet.kt#L186) to payment sheet and enables Affirm and AU BECS direct debit as payment methods within Payment Sheet.
Expand Down
6 changes: 6 additions & 0 deletions MIGRATING.md
@@ -1,5 +1,11 @@
# Migration Guide

## Migrating from versions < 20.X.X
- Changes to `PaymentSheet.Configuration`
* `primaryButtonColor` is now deprecated. Please use the new `Appearance` parameter instead:
* `Appearance.colorsLight/colorsDark.primary`
* `PrimaryButton.colorsLight/colorsDark.backgroundColor`

## Migrating from versions < 20.2.0

- Changes to `CollectBankAccountLauncher`
Expand Down
Expand Up @@ -108,6 +108,13 @@ class PaymentSheet internal constructor(
*
* If set, PaymentSheet displays the button with this color.
*/
@Deprecated(
message = "Use Appearance parameter to customize primary button color",
replaceWith = ReplaceWith(
expression = "Appearance.colorsLight/colorsDark.primary " +
"or PrimaryButton.colorsLight/colorsDark.background"
)
)
val primaryButtonColor: ColorStateList? = null,

/**
Expand Down Expand Up @@ -158,6 +165,13 @@ class PaymentSheet internal constructor(
fun googlePay(googlePay: GooglePayConfiguration?) =
apply { this.googlePay = googlePay }

@Deprecated(
message = "Use Appearance parameter to customize primary button color",
replaceWith = ReplaceWith(
expression = "Appearance.colorsLight/colorsDark.primary " +
"or PrimaryButton.colorsLight/colorsDark.background"
)
)
fun primaryButtonColor(primaryButtonColor: ColorStateList?) =
apply { this.primaryButtonColor = primaryButtonColor }

Expand Down