-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support material3-window-size-class #2404
Comments
any updates? |
Bumping this up! Any info? |
What makes it different than just getting the size of your root composable and using CompositionLocal to pass it down the tree? |
Material3 theme guidelines have exact descriptions of what to use with different size classes, for example, drawer for large, rail for medium, and bar for small. |
I see your point but what I mean is that this is something in the application side rather than in compose itself. It is in the material spec however I don't see a size to describe TV. Also I believe the width/height aspect ratio is important too, not just one dimension size. |
Well, it is not a separate library - for JetBrains Compose it simply does not exist. I do not see why would you not implement features that can be found in Google Compose. For me, writing the math myself isn't worth it. Sure, it is simple, but I have lots of these small simple stuff to implement. If it was a library, android & iOS support could be a thing - but it is not, and implementing support for them manually, as I said, will take too much time. This will be a neat thing, but not really major for me. I do not see why would you object to the addition of such an API? |
Oh I see, excuse my ignorance. I see it has been released as part of material 3 artifacts recently. Sorry I didn't know that, I thought it was still being released as a separate library. In such a case I believe it is just a matter of time until JB catches up with Google stuff. |
FYI: I built https://github.com/chrisbanes/material3-windowsizeclass-multiplatform as a stop-gap until support comes to Compose Multiplatform. |
With 1.5.0 release. in desktop, LocalWindow.current is marked internal and hence not accessible, any known alternative to get current windows DpSize ? |
@igordmn |
hi, I wonder why we can’t integrate it into the CompositionLocal (at least in android side) It was very easy to use this like :
and use it in code :
Am I missing something about using it in Local composition !!! |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
See https://developer.android.com/reference/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass
The text was updated successfully, but these errors were encountered: