You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compose Material3: TypographyKt.Typography(...) builder missing from binding (TextStyle inline-class mangling, related to java-interop#1440) #1453
In Xamarin.AndroidX.Compose.Material3Android (verified against 1.4.0.3), the TypographyKt companion class only exposes the LocalTypography CompositionLocal accessor — the public Typography(displayLarge, displayMedium, …, labelSmall) builder
function is missing entirely:
Every parameter is androidx.compose.ui.text.TextStyle, which is
itself a regular class but has constructors and copy(...) overloads
saturated with @JvmInline value class fields (Color, TextUnit, FontWeight, FontStyle, BaselineShift, TextGeometricTransform,
…). That triggers the same JVM-mangling story documented in dotnet/java-interop#1440 — the public Typography factory
in the bytecode is something like Typography-…, and the current
metadata pipeline strips it.
— so the typeTypography is fully bound and consumable; only the factory function that lets you build a customized Typography
with the standard defaults is missing. This blocks jonathanpeppers/compose-net#61 (parameterizing MaterialTheme).
Ask
Two paths, listed in order of preference:
Long-term: once dotnet/java-interop#1440 lands and @JvmInline value class mangling is unwound at bind time, the Typography(...) builder should reappear automatically. Track
this issue against that PR.
Short-term workaround (if waiting on Un-strip ui-text-android and ui-unit-android Compose bindings #1440 is not viable):
add an explicit managedName rename in material3-android/Transforms/Metadata.xml that aliases the
bytecode-mangled Typography-… static method back to a stable
managed name (TypographyKt.Typography), the same pattern used
for Text--4IGK_g → Text / Button-bWB7cM8 → Button in
downstream metadata fixes.
Verification
After the fix, this should compile (in either form):
Activity
Add Color struct and parameterise MaterialTheme (refs #61) (#133)