Customisations

How to change the Loyalty card layout in Account section

By default the Loyalty card layout presented at Account section is UiLoyaltyLayout.COMPACT_CARD, if you need to change it to UiLoyaltyLayout.BARCODE_CARD, you need to:

  1. In your Application class create a method called initSettings and add the following code to it:
    loyaltyComponentSettings = {
    LoyaltyComponentSettings(
    layout = UiLoyaltyLayout.BARCODE_CARD
    )
    }
  2. Include a call to initSettings method on onCreate after Koin load modules call.

How to change the barcode format

By default, the Barcode format used is BarcodeFormat.CODE_128, if you need to change it to any format supported by com.google.zxing library, you need to:

  1. In your Application class create a method called initSettings and add the following code to it:
    loyaltyComponentSettings = {
    LoyaltyComponentSettings(
    barcodeFormat = BarcodeFormat.CODE_128
    )
    }
  2. Change the line barcodeFormat = BarcodeFormat.CODE_128 to the required format.
  3. Include a call to initSettings method on onCreate after Koin load modules call.