[TIMOB-2361] Android: window, createWindow does not respect title property
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-08T23:19:56.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, defect, window |
Reporter | Paul Dowsett |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:17:44.000+0000 |
Updated | 2017-06-08T23:19:56.000+0000 |
Description
Environment: android 1.4.X (12 Nov), emulator, on ubuntu
As per http://developer.appcelerator.com/question/80191/changing-title-in-new-windows"> this user's post to the Q&A, and my subsequent tests shown below, I can confirm that the title property is not respected when set at creation time, and the window is not modal/heavyweight.
The problem exists also when a new context is created (win3.js below), and a further context thereafter (not shown).
To workaround this issue, users may set navBarHidden:false, but there may be reasons why they need a lightweight view. Thus, this issue may be regarded as trivial, if this is a rare case.
app.js:
var win1 = Ti.UI.createWindow({
backgroundColor: "red",
title: "window title: win1",
exitOnClose: true
});
win1.open();
var label1 = Ti.UI.createLabel({title:'label: window 1'});
win1.add(label1);
var win2 = Ti.UI.createWindow({
backgroundColor: "green",
title: "window title: win2"
});
win2.open();
var label2 = Ti.UI.createLabel({title:'label: window 2'});
win2.add(label2);
var win3 = Ti.UI.createWindow({
backgroundColor: "blue",
title: "window title: win3",
url:'win3.js'
});
win3.open();
win3.js:
var win = Ti.UI.currentWindow;
var label = Ti.UI.createLabel({title:'label: window 3'});
win.add(label);
var win4 = Ti.UI.createWindow({
backgroundColor: "yellow",
title: "window title: win4",
url:'win4.js'
});
win4.open();
Further to this, the is some unintuitive behaviour in relation to setting the title after creation.
If it is set after the window is opened, the title is displayed:
If the title is set before the window is opened, the title is not displayed.
title is displayed:
title not displayed:
Possibly, ticket #2786 is related to this post.
Closing ticket as there has been no input for the last 6 years. Any problems, please file a new ticket.