android - Creating checkbox using titanium alloy -
i new in titanium alloy , change project titanium default template alloy. below code creating text box in default template. change alloy template.
var checkbox = ti.ui.createswitch({ id:'checkbox', style:ti.ui.android.switch_style_checkbox, });
not hard @ all! try inside alloy xml view markup:
checkbox.xml
<alloy> <switch id="checkbox"/> </alloy> now can use style file set attributes based on id.
checkbox.tss
"#checkbox[platform=android]" : { style:ti.ui.android.switch_style_checkbox } this set style checkbox, note set happen android. alternatively, if wanted every switch of checkbox style set inside app.tss:
"switch" : { style:ti.ui.android.switch_style_checkbox }
Comments
Post a Comment