Skip to navigation

The SDK provides two logo views:

  • AfterpayLockup: the logo lockup. For US merchants, it shows the Cash App Afterpay lockup: the Cash App icon next to the Afterpay wordmark.
  • AfterpayBadge: the Afterpay or Clearpay badge for merchants outside the US. It’s always hidden for US merchants.
Cash App Afterpay lockup with a green Cash App icon and a black Afterpay wordmark

Before you add a logo, set the merchant configuration. The logo views read the configuration only when you create them or set their style. See UI components.

Add the lockup

<com.afterpay.android.view.AfterpayLockup
android:layout_width="120dp"
android:layout_height="wrap_content"
app:afterpayStyle="alt" />

The lockup scales to the width you give it and keeps its aspect ratio. Its minimum width is 64dp.

The view sets its content description to the brand name and is focusable, so screen readers announce it.

Lockup styles

The lockup has no background, so choose a style that contrasts with the color behind it. The default style is Default.

StyleXML valueUse onAppearance
AfterpayWidgetStyle.Defaultdefault_styleDark backgroundsGreen Cash App icon with a white Afterpay wordmark on black
AfterpayWidgetStyle.AltaltLight backgroundsGreen Cash App icon with a black Afterpay wordmark on white
AfterpayWidgetStyle.MonochromeDarkmonochromeDarkDark backgroundsWhite Cash App Afterpay lockup on black
AfterpayWidgetStyle.MonochromeLightmonochromeLightLight backgroundsBlack Cash App Afterpay lockup on white

Default and Alt render the full-color lockup, with the Cash App icon in Cash App green. The monochrome styles render the lockup in a single color.

For merchants in other regions, the lockup shows the Afterpay or Clearpay wordmark in the foreground color of the matching color scheme. See Styles and color schemes.

Badge for other regions

AfterpayBadge shows the Afterpay badge, or the Clearpay badge for UK merchants, on a colored background. It has the same style property and app:afterpayStyle attribute as the lockup, and a minimum width of 64dp.

<com.afterpay.android.view.AfterpayBadge
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:afterpayStyle="default_style" />
The badge is hidden for US merchants

Cash App Afterpay branding doesn’t include a badge. When the configured locale is en-US, AfterpayBadge sets its visibility to View.GONE. Use AfterpayLockup for US merchants.

Visibility

Both logo views hide themselves when the SDK isn’t enabled for the current configuration. See When components are hidden.

Attributes and properties

ViewXML attributeKotlin propertyDefault
AfterpayLockupapp:afterpayStylestyledefault_style (Default)
AfterpayBadgeapp:afterpayStylestyledefault_style (Default)