Problems after migration to version 2.0+
See original GitHub issueHello, thanks again for the great library.
We have faced several issues after migration to beagle drawer-layout. I see that now the base implementation uses a fragment under the hood. It introduced a few problems:
- We use Accessibility an application and now
OverlayFragment
request focus all the time due to he is a root 🙂 - Due to we have a legacy code we sometimes replace fragment in
android.R.id.content
and in this case we lose Beagle on this screen)
Thanks a lot.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Troubleshooting migration to the latest versions
Troubleshooting migration to the latest versions · Deprecated or removed objects · Configuration conflict: Commitment policy and algorithm suite · Configuration ...
Read more >My flutter 2.0 migration story : Still better story than twilight
Upgrade flutter and dart version to 2.0 and migrate the existing project to the new updated development environment. Disclaimer: Always make a complete ......
Read more >Problems with migration from JSF 1.2 to 2.0
The first step was to fix the the web. xml and move to Servlet API 2.5. After this I replaced the dependencies and...
Read more >3.0 upgrade, keeping migration versions data · Issue #967 · ...
I had no problems with keeping migrations data. I did have to run doctrine:migrations:sync-metadata-storage to upgrade to the new storage format ...
Read more >Error while Add-Migration "Initialize" in .NET 6 Entity ...
The framework 'Microsoft.NETCore.App', version '2.0.0' (x64) was not found. You can resolve the problem by installing the specified framework ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One more update: I’ve played around a bit with the back stack listener in this commit and there is a slight chance that these changes will fix your second issue. Theoretically now the OverlayFragment should be re-added to the top of the stack every time the stack changes.
If you haven’t given up on the library yet, could you give it a try? These changes are part of the new v2.0.3 release.
Hi,
Sorry to hear about these problems. Both of your issues make perfect sense and come down to some core design decisions on my side. Unfortunately, I don’t yet have a good solution, but let me give you some explanations, maybe together we will figure something out:
OverlayFragment
is indeed added on top of every Activity: in case of the drawer it is responsible for Beagle’s UI (the old versions’ hacky way of removing the root View of every Activity and “injecting” a DrawerLayout instead was glitchy, hacky and probably introduced more problems - this solution feels a lot cleaner). Furthermore it also handles persmissions / Activity results (for the screenshot / screen capture features) and hosts theOverlayView
which provides a way for drawing over the UI (for example theKeylineOverlaySwitchModule
relies on it). ObviouslyOverlayFragment
should not affect the functionality of the underlying app in any way apart from these. I didn’t work with accessibility that much, do you maybe know a simple fix for not stealing the focus? How can we forward these events without knowing what’s below?Three ideas: a) If your legacy code happens to rely on the FragNav library, this workaround might help. b) I could add an optional lambda to the Beagle configuration’s Behavior object: it would receive an Activity type parameter and would expect an ID resource in response that can be used as OverlayFragment’s container. Unfortunately this also would need some refactoring of your legacy codebase to add empty FrameLayouts over the Activities. Anyway, would this help? c) What do you think, in the
addOverlayFragment()
function of this class, if we usedadd()
instead ofreplace()
- could that fix your issue? Probably not, since in your case your own implementation seems to be callingreplace()
after Beagle, so the debug menu wouldn’t be added to the top (and we could also introduce some unwanted stack handling issues).All in all: I’ll let you know if I have any other ideas but right now the best that I can say is that in release builds your app will work as expected (the
noop
library surely won’t break focus handling). Do you maybe have any ideas that we could try? If you have the time and feel like experimenting, maybe consider cloning this repository (here is a guide that will help with the module structure).Thanks for the bug report!