[TIMOB-2603] Android - JSS Not Applied To File Includes
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T03:24:11.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M05 |
Components | Android |
Labels | android, defect, release-1.6.0 |
Reporter | Andreas sandberg |
Assignee | Don Thorp |
Created | 2011-04-15T03:24:11.000+0000 |
Updated | 2017-03-02T18:16:56.000+0000 |
Description
If a file is included from app.js and creates any type of UI element, the jss properties are not applied at all for Android to those elements. It does however work just fine on iphone. Here's a code sample:
app.js
var window = Ti.UI.createWindow({
id:"w"
});
Ti.include('utils.js');
utils.js
var b = Titanium.UI.createButton({id:'b1'});
window.add(b);
window.open();
app.jss
#b1
{
width:100;
height:200;
title:'test';
}
I don't know at this point if this is even a valid expectation of JSS since iOS is non-compliant across so many areas of JSS.
The JSS file that's used is dependent on the path that the view is created from, so in this case the JSS file should be in utils.jss. If you want to house common definitions in one place, you can create a common.jss, and include it from both app.jss and utils.jss, or use "global.jss"
Closing as invalid.