[ALOY-139] Android : Unable to add a window to the root index on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2012-07-27T11:05:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Runtime |
Labels | n/a |
Reporter | Michael Pettiford |
Assignee | Tony Lukasavage |
Created | 2012-07-27T10:27:21.000+0000 |
Updated | 2014-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
File | Date | Size |
---|---|---|
alloylogfile.txt | 2012-07-27T10:27:21.000+0000 | 8758 |
I'll check into this ASAP
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 ofTi.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}Ahh good catch Tony, forgot about that. Sorry for the invalid bug
Closing this as an invalid bug.