{ "id": "62993", "key": "TIMOB-2361", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2017-06-08T23:19:56.000+0000", "created": "2011-04-15T03:17:44.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "defect", "window" ], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-08T23:19:56.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}
Environment: android 1.4.X (12 Nov), emulator, on ubuntu
\nAs per \nthis user's post to the Q&A, and my subsequent tests shown\nbelow, I can confirm that the title property is not respected when\nset at creation time, and the window is not modal/heavyweight.
\nThe problem exists also when a new context is created (win3.js\nbelow), and a further context thereafter (not shown).
\nTo workaround this issue, users may set navBarHidden:false, but\nthere may be reasons why they need a lightweight view. Thus, this\nissue may be regarded as trivial, if this is a rare case.
\napp.js:
\n\nvar win1 = Ti.UI.createWindow({\n backgroundColor: \"red\",\n title: \"window title: win1\",\n exitOnClose: true\n});\nwin1.open();\nvar label1 = Ti.UI.createLabel({title:'label: window 1'});\nwin1.add(label1);\n\n\nvar win2 = Ti.UI.createWindow({\n backgroundColor: \"green\",\n title: \"window title: win2\"\n});\nwin2.open();\nvar label2 = Ti.UI.createLabel({title:'label: window 2'});\nwin2.add(label2);\n\n\nvar win3 = Ti.UI.createWindow({\n backgroundColor: \"blue\",\n title: \"window title: win3\",\n url:'win3.js'\n});\nwin3.open();
\n
\nwin3.js:
\n\nvar win = Ti.UI.currentWindow;\nvar label = Ti.UI.createLabel({title:'label: window 3'});\nwin.add(label);\n\nvar win4 = Ti.UI.createWindow({\n backgroundColor: \"yellow\",\n title: \"window title: win4\",\n url:'win4.js'\n});\nwin4.open();
\n
Further to this, the is some unintuitive behaviour in relation\nto setting the title after creation.
\nIf it is set after the window is opened, the title\nis displayed:
\nIf the title is set before the window is opened, the title\nis not displayed.
title is displayed:
\n\nvar win1 = Ti.UI.createWindow({\n backgroundColor: \"red\",\n exitOnClose: true\n});\nwin1.open();\nwin1.title = \"window title: win1\";
\n
\ntitle not displayed:
\n\nvar win1 = Ti.UI.createWindow({\n backgroundColor: \"red\",\n exitOnClose: true\n});\nwin1.title = \"window title: win1\";\nwin1.open();
\n
Possibly, ticket #2786 is related to this post.