Skip to content
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

Different Screen Sizes #31

Open
Gaetano-Dati opened this issue Jan 14, 2022 · 5 comments
Open

Different Screen Sizes #31

Gaetano-Dati opened this issue Jan 14, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@Gaetano-Dati
Copy link

Hi, this is a really useful library. Thanks for doing such work.

I'm just opening this issue to ask you for support on Tablets (2 screens at the same time maybe) and Surface Duo with a hinge. Have you planned to do this enhancement?

Thanks

@raamcosta raamcosta added the enhancement New feature or request label Jan 14, 2022
@raamcosta
Copy link
Owner

Hi @Gaetano-Dati !

Thank you! I'm glad you like it!

As far as some kind of support for showing "2 screens" side by side, I have had some ideas about it, but I think this is a cool enhancement with low priority at the moment. You can still do this just like you would with normal compose navigation. This lib could help with the boilerplate to doing that, but that is it.

Thank you again for using the lib and suggesting improvements 🙏

@Vahalaru
Copy link
Contributor

You could do this by making a composable screen that houses the 2 screens your wanting. That and by doing a device type check before navigating or orientation change.

@andre-artus
Copy link

The NowInAndroid sample App from Google passes WindowSizeClass around so that each composable can adapt as needed. Is there a mechanism to provide this to generated destinations?

@raamcosta
Copy link
Owner

Hey! Ofc, very easily! You can use dependencyContainerBuilder parameter and make that available for all screens that request it.

Check that feature here:
https://composedestinations.rafaelcosta.xyz/destination-arguments/navhost-level-parameters#use-dependenciescontainerbuilder-to-prepare-dependencies

@andre-artus
Copy link

Thanks, that will be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants