Builder
Java-friendly Builder for constructing PrimitiveCard. Allows setting only the properties you need -- all others use sensible defaults.
Kotlin callers should prefer the PrimitiveCard constructor with named parameters; the Builder pattern is supported here only so that the litho_card_spec_to_kotlin_api codemod can produce idiomatic Java migrations from the legacy Card builder to PrimitiveCard.create(c, content)...build().
Two construction paths:
new PrimitiveCard.Builder(content)-- for callers that only set already-resolved values (e.g.,cardBackgroundColor(int),cornerRadiusDp(float)).PrimitiveCard.create(c, content)-- for callers that want to use*Res/*Attroverloads (e.g.,cornerRadiusRes(R.dimen.foo),cardBackgroundColorAttr(R.attr.bar)). These overloads require a ComponentContext for resource resolution.
Usage:
PrimitiveCard.create(c, content)
.cardBackgroundColorAttr(R.attr.fds_usage_surface_background)
.cornerRadiusRes(R.dimen.fbui_padding_half_standard)
.elevationDp(8f)
.build();