Search code examples
titaniumtitanium-mobiletitanium-alloytitanium-modulestitanium-widgets

Titanium alloy check box creation label is not showing


I need to create a check box in my app. So for the same reason I have installed the native check box widget from the following link http://gitt.io/component/checkbox

After installation when I run my app, the result is as follows,

enter image description here

But I need to show the options for the check box. But i am not able to add the option label text for the check boxes. Can any one help me how to add the options text for check box.

I need the output similar to as follows,

enter image description here

Please help me how do do that. Or any other best alternatives.Please..


Solution

  • I guess what you need is a view element which contains the checkBox and the corresponding label. Like this:

    <View id="yourOuterView" layout="vertical">
        <!-- other stuff -->
        <View id="checkBoxContainerView" layout="horizontal">
            <CheckBox />
            <Label id="yourLabel" />
        </View>
    </View>
    

    Please use your Checkbox code properly, I couldn't put it in because you did not provide any code. It is also possible to use an inner view without a layout by giving the checkBox and the label left/right attributes.