-
Notifications
You must be signed in to change notification settings - Fork 7
Customizing Colors in Payment SDK for Android
Warning: This feature is available in version 3.1.0, but it is still in its early stages. Users may encounter bugs and issues while using it.
To customize the colors in the Payment SDK for Android, developers can override specific color resources. Below is a list of available color resources and their default values:
Resource Name | Description | Default Value |
---|---|---|
payment_sdk_toolbar_color | Toolbar background color | #000000 |
payment_sdk_toolbar_text_color | Toolbar text color | #FFFFFF |
payment_sdk_toolbar_icon_color | Toolbar icon color | #FFFFFF |
payment_sdk_pay_button_background_color | Pay button background color | #4885ED |
payment_sdk_pay_button_text_color | Pay button text color | #FFFFFF |
payment_sdk_progress_loader_color | Progress loader color | #3A8377 |
payment_sdk_card_center_color | Card gradient center color | #232527 |
payment_sdk_card_center_color | Card gradient center color | #232527 |
payment_sdk_card_center_color | Card gradient center color | #232527 |
payment_sdk_floating_hint_color | Floating hint text color | #4885ED |
Developers can customize these colors by overriding the corresponding resources in their Android application. To change a color, add the desired color code to your app's resources and use the resource name as indicated above.
For example, to change the toolbar background color, add the following code to your app's resources:
<color name="payment_sdk_toolbar_color" tools:override="true">your_color_code_here</color>
Replace your_color_code_here
with the desired color code.
Please ensure that you use valid color codes in the format #RRGGBB or #AARRGGBB, where RR, GG, BB, and AA represent the red, green, blue, and alpha components in hexadecimal values.
Customising these colors allows you to tailor the Payment SDK's appearance to match your app's design.