Ir al contenido

SizeGuideView (Views)

Esta página aún no está disponible en tu idioma.

Componentcom.tryyoursize:tryyoursize-android

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

contextContextObligatorio
attrsAttributeSet?Opcional= null
defStyleAttrIntOpcional= 0
clientTryYourSize?Obligatorio

Your client.

productString?Obligatorio

Your product ID or SKU.

variantSizeGuideVariantObligatorio

LINK (default) or BUTTON.

labelString?Obligatorio

Your own words instead of "Size guide".

onRecommendation((Recommendation) -> Unit)?Obligatorio

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 -> /* … */ }
}

¿Te ha resultado útil esta página?