General guidelines
Yuno Android SDK supports XML themes and styles, which should be defined within your application’s styles. Android customizations are a work in progress and are continuously updated.Customizable elements
Elements you can modify for a personalized style. Some customizations require version 1.13.0 or higher.Font styles
You can override Yuno Android SDK fonts if you want to use your font family. You can override the following font styles:YunoRegularFontYunoMediumFontYunoBoldFont
Button styles
Override button styles; available options depend on SDK version. Buttons you can customize:
For each style, you can set the following attributes:
Button.Normal.NeutralB and button font):
Color styles
Override color styles to personalize the SDK; options depend on SDK version. Color styles by version:
Example (colors, SDK v1.13.0+):
Text styles
You can override Yuno Android SDK text styles to personalize the SDK’s appearance.This feature is only available for SDK version 1.13.0 or higher.Customization attributes per text style:
Example (text customizations):
Create your own card form flow
The first step to creating your card form flow is to create a new layout resource file calledscreen_payment_card_form.xml to override the current XML and implement your design.
After creating the screen_payment_card_form.xml file, you can define your own design. You need to use the Yuno secure-fields components, which ensures that the Yuno SDK can retrieve credit card information during the checkout. Below, you will find a list of all the components you can use to change the design:
v1.10.0 or higher
Additional components are available for the Yuno SDK version v1.10.0 or higher. These components are listed in the subsection below.CloseButton: Button to close the form.
CardNumberEditText: Field where the user can enter the credit card number.
CardDataStackView: Field where the user can enter the credit card’s expiration date and verification code (CVV/CVC).
TextViewfor Voucher card type: This is a copy Yuno SDK shows when the card isVOUCHERtype, you must set it below the CVV field.
TextFieldItemViewfor card holder’s name: Field where the user can enter the credit card holder’s name.
SpinnerFieldItemViewfor identification document type: A selector where the credit card holder can choose their identification document type.
TextFieldItemViewfor identification document number: Field where the user can enter the credit card holder’s identification document number.
PhoneInformationViewfor customer’s phone number: Field where the user can enter his phone number if required. In addition to providing the Androidid, it’s required to havegonevisibility.
Installments: Component that shows the spinner of card installments. In addition to providing the Androidid, it’s required to havegonevisibility, and you need to add theShimmerFrameLayoutdependency:implementation 'com.facebook.shimmer:shimmer:0.5.0'.
- Yuno’s
TextView: A text to show that Yuno verified the form.
CustomYunoSwitch: It’s a switch component that lets the user choose if the card will be used as credit or debit. In addition to providing the Androidid, it’s required to havegonevisibility.
CustomYunoSwitch: A tooltip to show how the switch works. In addition to providing the Androidid, it’s required to havegonevisibility. Yuno recommends positioning this component next to the switch.
AppCompatCheckBox: A check box users can use to choose whether to save the credit card for future purchases.
Button: It validates the card form and continues the payment process. When the user clicks this button, the SDK submits the form and sends the credit card information to Yuno.
Components available for v1.10.0 and higher
Available only for SDK v1.10.0 or higher.TextFieldItemViewfor customer’s address: It is used to input the customer’s address when required. Ensure it is utilized with its specified Androidid(@+id/textField_address) and is set to havegonevisibility by default.
TextFieldItemViewfor customer’s state: It allows the customer to enter their state if needed. It must be used with the defined Androidid(@+id/textField_state) and should havegoneas the default visibility.
TextFieldItemViewfor customer’s city: It is designated for the input of the customer’s city. It should be used with the provided Androidid(@+id/textField_city) and maintain a default visibility setting ofgone.
TextFieldItemViewfor customer’s zip code: This is where the customer can input their zip code. Ensure it is implemented using the specified Androidid(@+id/textField_zip_cod) and hasgonevisibility by default:
SpinnerFieldItemViewfor customer’s country: This SpinnerFieldItemView selects the customer’s country when necessary. It must be utilized with the defined Androidid(@+id/spinner_country) and should have a default visibility ofgone.
SpinnerFieldItemViewfor customer’s gender: It is used to select the customer’s gender if required. Ensure it is used with its defined Androidid(@+id/spinner_gender) and is set togonevisibility by default.