-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(android): parity for Tab.popToRootWindow() #13976
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
Conversation
|
@m1ga Can you give me an update on a few of your |
|
I just don't use this in any app so I don't have many test data to verify it doesn't have side effects. It's only still a draft as I don't have any infos besides this one demo that it is working 😄 It was requested on Slack from time to time so I've added this but no one tested it. I'll change it to ready for review so we can get some more people to test it |
hansemannn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments to make it less error-prone
android/titanium/src/java/org/appcelerator/titanium/TiApplication.java
Outdated
Show resolved
Hide resolved
android/titanium/src/java/org/appcelerator/titanium/TiApplication.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Hans Knöchel <[email protected]>
An iOS TabGroup opens Windows inside of it and you can use
Tab.popToRootWindow()to close all those tabs. Since Android is opening new windows we don't have that stack and can close them.The idea is to emulate that behavior by looking at the first activity and check if it is a TabGroup. If so loop through all activity above it and close them.
Works with
style: Titanium.UI.Android.TABS_STYLE_BOTTOM_NAVIGATIONtoo.Test:
closeTodo:
simplescreenrecorder-2024-01-29_21.14.34.mp4