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 autocomplete affordance to the address element. #5927

Merged
merged 15 commits into from
Jan 18, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## XX.XX.XX - 2023-XX-XX

### PaymentSheet
* [CHANGED][5927](https://github.com/stripe/stripe-android/pull/5927) Customers can now re-enter the autocomplete flow of the Address Element by tapping an icon in the line 1 text field.

## 20.18.0 - 2023-01-17
### Payments
* [ADDED][6012](https://github.com/stripe/stripe-android/pull/6012) Support for the predictive back gesture.
Expand Down
44 changes: 0 additions & 44 deletions payments-ui-core/api/payments-ui-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -81,50 +81,6 @@ public final class com/stripe/android/ui/core/elements/AddressSpec$Companion {
public final class com/stripe/android/ui/core/elements/AddressTextFieldUIKt {
}

public final class com/stripe/android/ui/core/elements/AddressType$Normal : com/stripe/android/ui/core/elements/AddressType {
public static final field $stable I
public fun <init> ()V
public fun <init> (Lcom/stripe/android/ui/core/elements/PhoneNumberState;)V
public synthetic fun <init> (Lcom/stripe/android/ui/core/elements/PhoneNumberState;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Lcom/stripe/android/ui/core/elements/PhoneNumberState;
public final fun copy (Lcom/stripe/android/ui/core/elements/PhoneNumberState;)Lcom/stripe/android/ui/core/elements/AddressType$Normal;
public static synthetic fun copy$default (Lcom/stripe/android/ui/core/elements/AddressType$Normal;Lcom/stripe/android/ui/core/elements/PhoneNumberState;ILjava/lang/Object;)Lcom/stripe/android/ui/core/elements/AddressType$Normal;
public fun equals (Ljava/lang/Object;)Z
public fun getPhoneNumberState ()Lcom/stripe/android/ui/core/elements/PhoneNumberState;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/stripe/android/ui/core/elements/AddressType$ShippingCondensed : com/stripe/android/ui/core/elements/AddressType {
public static final field $stable I
public fun <init> (Ljava/lang/String;Ljava/util/Set;Lcom/stripe/android/ui/core/elements/PhoneNumberState;Lkotlin/jvm/functions/Function0;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/util/Set;
public final fun component3 ()Lcom/stripe/android/ui/core/elements/PhoneNumberState;
public final fun component4 ()Lkotlin/jvm/functions/Function0;
public final fun copy (Ljava/lang/String;Ljava/util/Set;Lcom/stripe/android/ui/core/elements/PhoneNumberState;Lkotlin/jvm/functions/Function0;)Lcom/stripe/android/ui/core/elements/AddressType$ShippingCondensed;
public static synthetic fun copy$default (Lcom/stripe/android/ui/core/elements/AddressType$ShippingCondensed;Ljava/lang/String;Ljava/util/Set;Lcom/stripe/android/ui/core/elements/PhoneNumberState;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)Lcom/stripe/android/ui/core/elements/AddressType$ShippingCondensed;
public fun equals (Ljava/lang/Object;)Z
public final fun getAutocompleteCountries ()Ljava/util/Set;
public final fun getGoogleApiKey ()Ljava/lang/String;
public final fun getOnNavigation ()Lkotlin/jvm/functions/Function0;
public fun getPhoneNumberState ()Lcom/stripe/android/ui/core/elements/PhoneNumberState;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/stripe/android/ui/core/elements/AddressType$ShippingExpanded : com/stripe/android/ui/core/elements/AddressType {
public static final field $stable I
public fun <init> (Lcom/stripe/android/ui/core/elements/PhoneNumberState;)V
public final fun component1 ()Lcom/stripe/android/ui/core/elements/PhoneNumberState;
public final fun copy (Lcom/stripe/android/ui/core/elements/PhoneNumberState;)Lcom/stripe/android/ui/core/elements/AddressType$ShippingExpanded;
public static synthetic fun copy$default (Lcom/stripe/android/ui/core/elements/AddressType$ShippingExpanded;Lcom/stripe/android/ui/core/elements/PhoneNumberState;ILjava/lang/Object;)Lcom/stripe/android/ui/core/elements/AddressType$ShippingExpanded;
public fun equals (Ljava/lang/Object;)Z
public fun getPhoneNumberState ()Lcom/stripe/android/ui/core/elements/PhoneNumberState;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public abstract class com/stripe/android/ui/core/elements/AdministrativeAreaConfig$Country {
public static final field $stable I
public synthetic fun <init> (ILjava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
Expand Down
10 changes: 10 additions & 0 deletions payments-ui-core/res/drawable/stripe_ic_search.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:tint="#000000"
android:viewportHeight="24"
android:viewportWidth="24"
android:width="24dp">
<path
android:fillColor="@android:color/white"
android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z" />
</vector>
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-b+es+419/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Suburbio</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Villa o localidad</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Buscar</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Paga en <num_installments/> cuotas sin interés de <installment_price/> con <img/>]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">El IBAN debe empezar con un código de país de dos letras.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">Banco iDEAL</string>
<string name="invalid_email_address">Dirección de correo electrónico no válida: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Compra ahora y paga después con Klarna.</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-ca-rES/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Suburbi</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Poble o municipi</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Cerca</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Feu <num_installments/> pagaments sense interessos de <installment_price/> amb <img/>]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">El teu IBAN ha de començar amb un codi de país de dues lletres.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">Bank iDeal</string>
<string name="invalid_email_address">Adreça electrònica no vàlida: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Compra ara o paga més endavant amb Klarna.</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-cs-rCZ/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Předměstí</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Vesnice nebo předměstí</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Hledat</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Platbu proveďte v <num_installments/> bezúročných splátkách, každou ve výši <installment_price/>, splácených přes <img/>]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">Číslo IBAN by mělo začínat dvěma písmeny kódu země.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">Banka iDEAL</string>
<string name="invalid_email_address">Neplatná e-mailová adresa: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Kupte nyní nebo zaplaťte později pomocí Klarna</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Forstad</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Landsby eller byområde</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Søg</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Betal i <num_installments/> rentefri afdrag på <installment_price/> hver med <img/>]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">Dit IBAN-nummer skal starte med en landekode på to bogstaver.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">iDEAL Bank</string>
<string name="invalid_email_address">Ugyldig e-mailadresse: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Køb nu, eller betal senere med Klarna.</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Vorort</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Dorf oder Gemeinde</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Suchen</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Zahlen Sie mit <img/> in <num_installments/> zinslosen Raten zu je <installment_price/>.]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">Ihre IBAN sollte mit einem zweistelligen Ländercode beginnen.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">iDEAL-Bank</string>
<string name="invalid_email_address">Ungültige E-Mail-Adresse: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Jetzt kaufen oder später mit Klarna bezahlen.</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-el-rGR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Προάστιο</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Χωριό ή κοινότητα</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Αναζήτηση</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Πληρώστε σε <num_installments/> άτοκες δόσεις των <installment_price/> με <img/>]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">Ο κωδικός IBAN σας πρέπει να αρχίζει με έναν διψήφιο κωδικό χώρας.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">iDEAL Bank</string>
<string name="invalid_email_address">Μη έγκυρη διεύθυνση email: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Αγορά τώρα ή πληρωμή αργότερα με Klarna.</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-en-rGB/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Suburb</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Village or Township</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Search</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Pay in <num_installments/> interest-free payments of <installment_price/> with <img/>]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">Your IBAN should start with a two-letter country code.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">iDEAL Bank</string>
<string name="invalid_email_address">Invalid email address: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Buy now or pay later with Klarna.</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Zona residencial</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Villa o comuna</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Buscar</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Pagar en <num_installments/> cuotas sin intereses de <installment_price/> con <img/>]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">El IBAN debe empezar con un código de país de dos letras.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">Banco iDEAL</string>
<string name="invalid_email_address">Dirección de correo electrónico no válida: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Compra ahora y paga después con Klarna.</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-et-rEE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Eeslinn</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Küla või alev</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Otsi</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Makske <num_installments/> <installment_price/> suuruse intressivaba osamaksega <img/> abil]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">Teie IBAN peab algama kahetähelise riigikoodiga.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">iDEALi pank</string>
<string name="invalid_email_address">Kehtetu e-posti address: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Ostke nüüd või makske hiljem Klarnaga.</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-fi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Esikaupunki</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Kylä tai kaupunkikunta</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Etsi</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Maksu <num_installments/> korottomassa <installment_price/> osassa maksutavalla <img/>]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">IBAN-tilinumero alkaa kaksikirjaimisella maakoodilla.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">iDEAL-pankki</string>
<string name="invalid_email_address">Virheellinen sähköpostiosoite: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Osta nyt tai maksa myöhemmin Klarnalla.</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-fil/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Suburb</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Bayan o Township</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Maghanap</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Magbayad ng <num_installments/> na walang interes na pagbabayad ng <installment_price/> gamit ang <img/>]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">Ang iyong IBAN ay dapat magsimula sa dalawang letra na code ng bansa.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">iDEAL Bank</string>
<string name="invalid_email_address">Hindi valid na email address: %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Bumili ngayon o magbayad sa ibang pagkakataon gamit ang Klarna.</string>
<!-- Klarna pay later copy -->
Expand Down
3 changes: 3 additions & 0 deletions payments-ui-core/res/values-fr-rCA/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<string name="address_label_suburb">Banlieue</string>
<!-- Used to describe an address field. -->
<string name="address_label_village_township">Village ou canton</string>
<!-- Title of a button with a 🔍 (magnifying glass) icon that starts a search when tapped -->
<string name="address_search_content_description">Rechercher</string>
<!-- This shows the message on Buy Now Pay Later LPM, afterpay. After the word "with" an Afterpay logo is displayed. can be moved to move the logo in the string. -->
<string name="afterpay_clearpay_message"><![CDATA[Payer en <num_installments/> versements sans intérêts de <installment_price/> avec <img/>]]></string>
<!-- Text for back button -->
Expand All @@ -64,6 +66,7 @@
<string name="iban_invalid_start">Votre IBAN doit commencer par un code pays à deux lettres.</string>
<!-- iDEAL bank section title for iDEAL form entry. -->
<string name="ideal_bank">Banque iDEAL</string>
<string name="invalid_email_address">Adresse de courriel non valide : %s</string>
<!-- Klarna buy now or pay later copy -->
<string name="klarna_buy_now_pay_later">Payez maintenant ou plus tard avec Klarna.</string>
<!-- Klarna pay later copy -->
Expand Down
Loading