Closed justin-caldicott closed 2 months ago
If it part of Jetpack Compose then it will not be usable from .NET for Android.
Compose UIs can only be created in Kotlin, not Java. As .NET for Android bridges via Java, it cannot create them either.
The Compose packages we provide contain the .jar
/.aar
so that libraries that depend on them will function, but they do not provide C# bindings as they can't be used to create Compose UIs.
Thanks for clarifying @jpobst. I'd not come across Jetpack Compose until yesterday (don't often get to work on our Android app). No problem, I've started to use the material-components equivalents.
Longer term I hope native UI's via .NET remains a thing if Google start to release features only via Jetpack Compose. The pattern of sharing as much as possible in view models between our apps and then using fairly thin native UIs has been working well for us. 🤞
Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
dotnet 8.0.402, android
Description
I can't work out how to include the material3 NavigationBar included in Jetpack Compose: https://m3.material.io/components/navigation-bar/overview
Are there bindings for this? I've been poking around in various assemblies added from the Xamarin.AndroidX.Compose.Material3 nuget package. The closest I found is
NavigationBarDefaults
andNavigationBarKt
but these appear to be classes, not views, so when I get errors when trying to add them to my Layout.xml.Steps to Reproduce
Xamarin.AndroidX.Compose.Material3
NuGet packageDid you find any workaround?
No response
Relevant log output
No response