Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27316] Android: Add TabGroup support to NavigationWindow

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2019-10-30T15:27:33.000+0000
Affected Version/sRelease 8.0.0
Fix Version/sRelease 8.3.0
ComponentsAndroid
LabelsNavigationWindow, TabGroup, android, parity
ReporterBrenton House
AssigneeYordan Banev
Created2019-08-07T14:33:24.000+0000
Updated2021-01-04T14:11:09.000+0000

Description

*Summary:* Currently, Android's NavigationWindow only supports opening Ti.UI.Window objects. It does *not* currently support opening a TabGroup like iOS. We should add TabGroup support for parity. *Test Code:* The [^NavWindowTabGroupTest.js] file sets up a TabGroup as the 1st window in a NavigationWindow and can launch a child Window from each tab. (Currently crashes with an exception.) The [^NavWindowChildTabsTest.js] has a Window as the 1st window in a NavigationWindow which opens a TabGroup as a child. This is a separate test case is needed since the open handling is different. (Currently shows a blank tab group with no tabs.) *Note:* iOS does not currently support displaying a TabGroup "title" in the NavigationWindow title bar. This is because our TabGroup does not currently support a "title" property. On Android, TabGroup does have an undocumented "title" property which would allow this to work. (Perhaps we should add "title" property support to iOS in the future.)

Attachments

FileDateSize
NavWindowChildTabsTest.js2019-08-08T23:26:53.000+00001567
NavWindowTabGroupTest.js2019-08-08T23:26:53.000+00001281

Comments

  1. Brenton House 2019-08-13

    [~ybanev] - Currently the biggest issue is that currentTab.open() opens a window on top of everything instead of inside the currentTab window (like iOS). This way, it would also have nav stack and history (like iOS) so you have back button capability. I just want to make sure that this ticket still reflects this.
  2. Yordan Banev 2019-08-13

    [~bhouse] If I get it right this will happen regardless of the TabGroup being a part of a NavigationWindow, right? If this is the case we may better keep the different scenarios in different tickets. Do we have one for what you mentioned?
  3. Brenton House 2019-08-13

    [~ybanev] - You can take a look at the history of this ticket
  4. Joshua Quick 2019-08-13

    [~bhouse], that should be a separate ticket since it's not related to NavigationWindow. From looking at [TIMOB-13409], it looks like we've never supported currentTab.open(). This is not a new issue.
  5. Joshua Quick 2019-08-13

    After chatting with Brenton, I now realize that I misunderstood the original issue this ticket originally described. (Note that I rewrote this ticket's description which refers to an entirely different issue, but is still relevant and needs to be addressed as well.) On Android, the Tab.open(Ti.UI.Window) method opens the window as an activity which is shown fully on top of the parent TabGroup activity. On iOS, the Tab.open(Ti.UI.Window) method opens a window *+within+* the TabGroup and the top title bar shows a back button to navigate back to the tab. So, the tab acts as a container for another window. The bottom tabs are still shown. This is the behavior Brenton is after. In my opinion, I think we should accept the platform behavior difference in this case. But that said, this behavior can be replicated via TabbedBar and ScrollableView instead of using a TabGroup. The key thing here is to use Views instead of Windows. Perhaps we should write up a "Story" ticket that provides sample code on how to do this.
  6. Yordan Banev 2019-08-22

    PR: https://github.com/appcelerator/titanium_mobile/pull/11166
  7. Satyam Sekhri 2019-10-29

    FR Passed. TabGroup works fine in NavigationWindow on Android.
  8. Samir Mohammed 2019-10-30

    Closing ticket. Improvement verified in SDK version 8.3.0.v20191030041914. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11166
  9. Brenton House 2020-12-30

    This PR seems to be related to this ticket: https://github.com/appcelerator/alloy/pull/1067

JSON Source