ios - Titanium Appcelerator Alloy not supporting formFactor styles for widgets -


i have developed sample code in created widget having view adds image view inside it. works perfect when apply styles tss of controller directly when "formfactor" used it's not working. clarify same please check code placed here.

you can create new alloy project , test same following code:

note: dependencies included in config.json

widget implementation:

widget.xml  <alloy>    <view id="section" class="section"></view> </alloy>   widget.tss  ".section":{     backgroundcolor: 'red',     layout : 'vertical' },   widget.js  var args = arguments[0] || {}; $.section.applyproperties(args);  $.setdata = function(view) {     $.section.add(view); } 

coding index page

index.xml  <alloy> <scrollview class="baseview">     <widget id="contentview" class="contentview" src="com.investis.scrollablesection"></widget> </scrollview> </alloy>   index.tss  ".contentview [formfactor=handheld]":{     backgroundcolor: 'green',     width: ti.ui.fill,     height: ti.ui.size }  index.js  var imgview = ti.ui.createview({     backgroundcolor: 'yellow',     top: 20,     left: 0,     right: 0,     width: ti.ui.fill,     height: ti.ui.size }); $.contentview.setdata(imgview); 

the same thing works if remove [formfactor=handheld] .contentview in index.tss

missing answer critical details, platform building for, version of titanium sdk you're using, , you're not clear expect compared see problem.

using code, building ios simulator, green scrollview filling width of screen, , 20dp high -- or without [formfactor=handheld] qualifier on index.tss class. if increase height of scrollview see yellow view within. so, what's problem?


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -