-
Notifications
You must be signed in to change notification settings - Fork 66
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
[MAUI] Bottom Tabs Not Interactable After Suspending Android App #84
Comments
I found a likely culprit. It seems to be a configuration issue -- if we set the ensure the already open activity is launched by setting LaunchMode to LaunchMode.SingleTop in MainActivity, it works as intended. When the launch mode is not set, it seems that this case unregisters tap/touch effects when suspending the app (via pressing the back button). In this case, the effects may need to be re-registered (e.g., iterate through all selectable tabs and unset tab/touch effects, then reset them on page appearing). Do you have any thoughts on the second case when LaunchMode is not set to LaunchMode.SingleTop? |
Same issue here. Are there any proper solutions to this or the LaunchMode is just that? It didnt solve our problem. Current workaround appears to be to remove and add a new instance of the tabs on each load. |
Btw: this is not strictly a sharpnado issue at its core. We have a custom control (extending ContentView) that utilizes toucheffects, and it also looses the effect after suspension. Fixed by reregistering the effect in the OnHandlerChanged override. |
@Masgharoth How'd you go about doing that? |
@expensivecow @Masgharoth @svaldetero Did anyone manage to work around this issue? If yes, could you please share the exact workaround? Would be good to finally get this fixed properly ... |
@janusw I did not. My app is running in Kiosk mode, so I just terminated the app when they try to suspend. Not a good approach, but better than the app being unusable after resuming.
|
Thanks for the reply! Anyone else? @expensivecow @Masgharoth Btw, I can reproduce the problem, as described in the original report (also with .NET 8 on the current main branch). |
I think I found a fix, see #126. Testing and feedback welcome ... |
Guys I'm currently testing it with the MauiSample and I can't reproduce the issue (MAUI 8/Pixel 5), so I guess it was a maui 7 issue |
Ok I reproduced it and will be fixed with version 3.1.0 |
should be fixed by v3.1.0, please re-open if it doesn't. |
Platform (please complete the following information):
Describe the bug
Hi Roubachof! I am using bottom tabs similar to the provided sample in NET MAUI (https://github.com/roubachof/Sharpnado.Tabs/tree/main/MauiSample). When I suspend the app using the back button and relaunch it, the tabs are no longer interactable. To me, it looks like some states aren't being preserved on app suspension for some reason, but I have not been able to debug the issue further yet.
Would you have any insights on why this might occur? I'll try to take a look today/tomorrow to see what I can find out otherwise.
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Observed Behavior: Bottom Tabs are not interactable.
Expected Behavior: Bottom Tabs can be clicked and views load as expected.
Screenshots (if applicable)
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: