Skip to content

SizeGuideView (Views)

Componentcom.tryyoursize:tryyoursize-android

The same button as an Android View: set client and product.

contextContextRequired
attrsAttributeSet?Optional= null
defStyleAttrIntOptional= 0
clientTryYourSize?Required

Your client.

productString?Required

Your product ID or SKU.

variantSizeGuideVariantRequired

LINK (default) or BUTTON.

labelString?Required

Your own words instead of "Size guide".

onRecommendation((Recommendation) -> Unit)?Required

The shopper's recommended size, on show and on every change.

// Views
val guide = SizeGuideView(context).apply {
client = tys
product = "SKU-123"
variant = SizeGuideVariant.BUTTON
onRecommendation = { rec -> /* … */ }
}

Was this page helpful?