Skip to content

Bind FloatingActionButton variants: Small/Large/Extended #52

@jonathanpeppers

Description

@jonathanpeppers

Only the base FloatingActionButton is wrapped. Material 3 1.4 ships size variants (Small, Large) and an extended (icon + label) variant — none are bindable today.

Missing composables (bindable in Xamarin.AndroidX.Compose.Material3 1.4.0.3)

Composable Kt class Notes
SmallFloatingActionButton FloatingActionButtonKt SmallFloatingActionButton-X-z6DiA — same shape as existing FAB
LargeFloatingActionButton FloatingActionButtonKt LargeFloatingActionButton-X-z6DiA — same shape
ExtendedFloatingActionButton (single content) FloatingActionButtonKt ExtendedFloatingActionButton-X-z6DiAFunction3<RowScope, …> content slot
ExtendedFloatingActionButton (icon + text + expanded) FloatingActionButtonKt ExtendedFloatingActionButton-ElI5-7k — multi-slot (icon, text, expanded:Boolean)

The M3 Expressive variants (MediumFloatingActionButton, FloatingActionButtonMenu, ToggleFloatingActionButton) are tracked separately in #103 — they need a newer Material3 NuGet.

Approach

Same as the existing FloatingActionButton — all four are hash-mangled (FloatingActionButton-X-z6DiA) because of Color / Dp inline-class parameters, so they need [ComposeBridge] partials + declarative [ComposeDefaults] enums.

The single-content ExtendedFloatingActionButton can use [ComposeFacade(Scope = "Row")] (same as Button/IconButton content). The icon/text overload has two slot lambdas — model the same way AlertDialog exposes named slot properties cleared from the defaults bitmask per call.

Tracking

Long-term, dotnet/java-interop#1440 lets the bridges collapse into the generated bindings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions