Titanium JIRA Archive
Alloy (ALOY)

[ALOY-139] Android : Unable to add a window to the root index on Android

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2012-07-27T11:05:42.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsRuntime
Labelsn/a
ReporterMichael Pettiford
AssigneeTony Lukasavage
Created2012-07-27T10:27:21.000+0000
Updated2014-06-22T13:23:13.000+0000

Description

*Note* This issue did not occur on iOS Steps to reproduce: 1. Create a default app in Ti Studio 2. Enable it for alloy 3. In the index.js file change the code to the following

var win = Ti.UI.createWindow({
		height: 100,
                backgroundColor : '#000'
	});
$.index.add(win);

$.index.open();
4. In the file index.xml remove the line for the hello world label so there is only one xml tag for the "container" window 5. Run the app Actual result: The app will fail to start and give an error *See attached log file* Expected result: The app launches normally

Attachments

FileDateSize
alloylogfile.txt2012-07-27T10:27:21.000+00008758

Comments

  1. Tony Lukasavage 2012-07-27

    I'll check into this ASAP
  2. Tony Lukasavage 2012-07-27

    It is a documented issue that top-level containers should not be added as children to other container views. Check the documentation for the add() function of Ti.UI.Window: http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.UI.Window From the docs: {quote} There are certain top-level containers that are not intended to be added as the children of other views. These top-level containers include Window, SplitWindow, and TabGroup. Other types of views must be added to a top-level container in order to be displayed on screen. {quote}
  3. Michael Pettiford 2012-07-27

    Ahh good catch Tony, forgot about that. Sorry for the invalid bug
  4. Michael Pettiford 2012-07-27

    Closing this as an invalid bug.

JSON Source