[ALOY-959] Alloy: Android ignores Alloy config settings
GitHub Issue | n/a |
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-02-18T16:45:31.000+0000 |
Affected Version/s | Alloy 1.3.1 |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Michael Stelly |
Assignee | Unknown |
Created | 2014-02-16T23:44:30.000+0000 |
Updated | 2018-03-07T22:28:29.000+0000 |
Description
Steps to Reproduce
Create two-tab project.
Create two controllers with views.
Add button to view1.
Add tabs to Alloy.CFG
Add event listener to view1 button that opens view2 in tab1 using Alloy.CFG syntax (see attached example).
Actual Result
In iOS, view2 opens in tab1 as intended. In android, view2 opens in its own window.
Expected Result
In android, view2 opens in tab1.
Attachments
Moving this ticket to engineering as I can reproduce the behavior difference between iOS and Android platforms.
This has nothing to do with Alloy.CFG, nor is it a bug. It is a platform difference between iOS and Android. On iOS, tabs include a NavigationWindow so that new windows opened within a tab automatically get the NavigationBar (title bar) and back button. On Android, there is no NavigationWindow control. Furthermore, windows on Android are heavyweight. Thus, new windows are opened as new activities, which are rendered outside of tab groups. Because there is no UI component like the iOS NavigationBar with a back button, Android users simply tap the Back button to close the window to return to the tab that opened it. The same behavior can be seen without the use of Alloy.CFG and could be reproduced with a "classic" project as well. If you want new "windows" to open within an existing tab, you will need to create and show() a View. Then, you can override the default Back button behavior to hide() that view instead of closing the activity.
Attached a sample app that doesn't use Alloy.CFG yet exhibits the same behavior. Create a new Alloy project, replace its app folder with the contents of this zip file.
Marking as invalid, not a bug.
I had not witnessed this behavior before encountering on my current project. Thanks for clarifying the issue. I thought I had either coded incorrectly or encountered a bug.
Closing as invalid. If this is incorrect, please reopen.