-
Notifications
You must be signed in to change notification settings - Fork 2
Quickstart
James Goodwin edited this page Oct 28, 2016
·
38 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.
-
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>
-
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) { // ...
-
Create a
Theme
object:var theme = new Theme { ButtonBackgroundColor = Color.FromHex("#F0C559"), PrimaryColor = Color.White };
-
Provide the theme object when initializing the Judopay SDK:
Judo judo = new Judo(); judo.Theme = theme; var paymentPage = new PaymentPage(judo);
var theme = new Theme
{
PageTitle = "Enter card details"
};
var theme = new Theme
{
ButtonLabel = "Pay now"
};
var theme = new Theme
{
ShowSecurityMessage = true
};