Quickstart

James Goodwin edited this page Dec 6, 2016 · 36 revisions

The Judopay Xamarin SDK supports a range of UI customization options to allow you to match the payment screen appearance to your app's branding.

Configuring the theme (Android)

  1. In your Android project, create a style in Resources/values/styles.xml. Note that you must have the Xamarin.Android.Support.v7.AppCompat library added to your Android project. In this example we'll customize the button color:

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="colorButtonNormal">#F0C559</item>
        <item name="colorAccent">@android:color/white</item>
    </style>
  2. In the Activity of your app, specify the theme:

    [Activity(Label = "My app", Icon = "@drawable/ic_launcher", Theme = "@style/AppTheme")]
    public class MainActivity : FormsAppCompatActivity
    {
         protected override void OnCreate(Bundle bundle)
         {
         // ...

Configuring the theme (iOS)

  1. Create a Theme object:

    var theme = new Theme
    {
       ButtonBackgroundColor = Color.FromHex("#F0C559"),
       PrimaryColor = Color.White 
    };
  2. Provide the theme object when initializing the Judopay SDK:

    Judo judo = new Judo();
    judo.Theme = theme;
    
    var paymentPage = new PaymentPage(judo);

Configuring displayed text

var theme = new Theme
{
   PageTitle = "Enter card details"
   ButtonLabel = "Pay now"
   ShowSecurityMessage = true
};

For a list of all customization options available, see the Theme reference

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.