Forum Discussion
EvgenyZobnin
Apr 25, 2022Copper Contributor
Dialogs and toasts in spanned mode
Hi. When the application is expanded to both screens, dialogs and toast are always displayed on the right screen. Is there anything I can do to change this behavior?
EvgenyZobnin
Apr 25, 2022Copper Contributor
CesarValienteThank you for your quick and complete response. I solved the problem with the dialogues. For toasts I will use a third party library that allows me to change the location of the message.
CesarValiente
Microsoft
Apr 25, 2022Awesome! Happy to hear that!
I completely forgot to mention what you just have said, that probably there are libraries out there that wrap a toast an allow you to move it around.
In fact, this is an approach we followed to build our SnackbarContainer. If you are using snackbars and want to place them on specific screen or both, don't miss our latest lib! https://docs.microsoft.com/dual-screen/android/api-reference/dualscreen-library/snackbar
Thanks,
Cesar
I completely forgot to mention what you just have said, that probably there are libraries out there that wrap a toast an allow you to move it around.
In fact, this is an approach we followed to build our SnackbarContainer. If you are using snackbars and want to place them on specific screen or both, don't miss our latest lib! https://docs.microsoft.com/dual-screen/android/api-reference/dualscreen-library/snackbar
Thanks,
Cesar
- EvgenyZobninApr 26, 2022Copper ContributorAnother problem: I can show "my" dialogs on the side I want, but the system dialogs are still on the right side. For example, I show a dialog in which I explain to the user why a certain permission is needed, then I invoke a request for that permission and the system shows the dialog on a different screen.
- CesarValienteApr 26, 2022
Microsoft
Hi Evgeny,
this is indeed an interesting scenario. Currently, there is not a way to indicate to the framework where the system dialogs should be shown when the app is spanned.
We can see if we can add something to work around this somehow. I will keep you posted in here, but please, don't expect anything in short term (don't want to block you on your work), this is indeed a more complicated task than handling app's dialogs.
Thanks for your question,
Cesar