EdfaPay Logo

Theme Customization

The SDK provides extensive customization options to match your app's branding and UX requirements. All theme settings should be configured before calling EdfaPayPlugin.initiate().

Quick Start

Loading...

Configure Early

Always set theme configuration before calling EdfaPayPlugin.initiate(). Theme changes after initialization may not take effect.

Color Customization

Customize the primary and secondary colors to match your brand identity.

Loading...
PropertyUsed ForRecommendation
Primary ColorButtons, headers, progress indicatorsUse your brand's main color
Secondary ColorText/icons on primary backgroundsEnsure contrast ratio > 4.5:1

Typography

Adjust the overall font size across all SDK screens for accessibility or display preferences.

Loading...
ValueEffectUse Case
0.8f20% smallerCompact displays
1.0fDefaultStandard usage
1.2f20% largerBetter readability
1.5f50% largerAccessibility, kiosk displays

Branding

Display your brand logo in the SDK header area.

Loading...

Logo Guidelines

  • Format: PNG with transparency (recommended) or JPEG
  • Dimensions: 200x60 pixels (or similar aspect ratio)
  • File size: Under 100KB for optimal performance
  • Background: Transparent works best with theme colors

Animations

Control animation speed and customize celebration animations.

Loading...
SpeedEffect
0.5fHalf speed (slower, more dramatic)
1.0fNormal speed
1.5f1.5x faster
2.0fDouble speed
3.0fTriple speed (snappy feel)

Presentation Modes

Configure how SDK screens are presented (dialogs, full screen, etc.).

Loading...

Available Presentation Types

PresentationPositionDescription
FULLSCREENFull screenTakes entire screen
DIALOG_CENTERCenterCentered modal dialog
DIALOG_BOTTOM_FILLBottomDefault - Bottom sheet, full width
DIALOG_BOTTOM_CENTERBottom-CenterBottom, horizontally centered
DIALOG_TOP_FILLTopTop-aligned, full width

Configuration Methods

MethodDescription
dismissOnTouchOutside(Boolean)Allow dismiss by tapping outside
dismissOnBackPress(Boolean)Allow dismiss with back button
animateEntry(Boolean)Enable entry animation
animateExit(Boolean)Enable exit animation
dimBackground(Boolean)Dim background when shown
dimAmount(Float)Dimming intensity (0.0 to 1.0)
cornerRadius(Int)Corner radius in dp
sizePercent(Float)Dialog height as screen percentage
setShufflePinPad(Boolean)Randomize PIN pad for security
setPurchaseSecondaryAction(Action)Set secondary button (REVERSE/REFUND/NONE)

Complete Examples

Standard Business Application

Loading...

Best Practices

  1. Configure Early: Always set theme before EdfaPayPlugin.initiate()
  2. Test Color Contrast: Ensure primary/secondary have WCAG AA contrast (4.5:1 minimum)
  3. Logo Optimization: Use appropriately sized images to prevent layout issues
  4. Presentation Choice: Use DIALOG_BOTTOM_FILL for standard mobile UX
  5. Security Features: Enable setShufflePinPad(true) for higher security needs