Titanium JIRA Archive
Alloy (ALOY)

[ALOY-959] Alloy: Android ignores Alloy config settings

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2014-02-18T16:45:31.000+0000
Affected Version/sAlloy 1.3.1
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterMichael Stelly
AssigneeUnknown
Created2014-02-16T23:44:30.000+0000
Updated2018-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

FileDateSize
.log2014-02-16T23:44:33.000+0000416663
android-ignores-config.txt2014-02-16T23:44:37.000+00001079
app.zip2014-02-18T16:43:16.000+00005904326
diagnostic7338306934447249470.log2014-02-16T23:44:36.000+000015133

Comments

  1. Ritu Agrawal 2014-02-18

    Moving this ticket to engineering as I can reproduce the behavior difference between iOS and Android platforms.
  2. Tim Poulsen 2014-02-18

    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.
  3. Tim Poulsen 2014-02-18

    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.
  4. Tim Poulsen 2014-02-18

    Marking as invalid, not a bug.
  5. Michael Stelly 2014-02-18

    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.
  6. Eric Merriman 2018-03-07

    Closing as invalid. If this is incorrect, please reopen.

JSON Source