Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2603] Android - JSS Not Applied To File Includes

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T03:24:11.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M05
ComponentsAndroid
Labelsandroid, defect, release-1.6.0
ReporterAndreas sandberg
AssigneeDon Thorp
Created2011-04-15T03:24:11.000+0000
Updated2017-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';
}

Comments

  1. Don Thorp 2011-04-15

    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.

  2. Marshall Culpepper 2011-04-15

    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"

  3. Lee Morris 2017-03-02

    Closing as invalid.

JSON Source