在tianium中显示单选按钮标签有问题吗? [英] Issue with displaying the radio button label in tianium?

查看:94
本文介绍了在tianium中显示单选按钮标签有问题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过以下链接创建了一个单选按钮, https://github.com/yozef/TiRadioButtonGroup .我能够看到单选按钮,但未显示相应的单选按钮标签.我们如何显示单选按钮标签.

I have created a radio button from the following link, https://github.com/yozef/TiRadioButtonGroup. I am able to see the radio buttons but the respective radio button labels are not showing. How can we display the radio button labels.

我的代码:

查看:

<Alloy>
    <Window class="container">
        <View id="radiopicker" ></View>
    </Window>
</Alloy>

样式:

".container": {
    backgroundColor:"red",
    layout: 'vertical'
}

"#radiopicker":
{
    width: '90%',
    top: '25dp'
} 

控制器:

(function() {   
    var radioButton = require('/ui/tiRadioButton'); 
    var radioGroup2 = radioButton.createGroup({
        groupId:1,
        width:20,
        height:150,
        layout:'vertical',
        radioItemsValue:['One', 'Two', 'Three'],
        radioItemsPadding:10,
        radioItemsBackgroundSelectedImage:'/radioButtonActive.png',
        radioItemsBackgroundImage:'/radioButton.png',
        radioItemsWidth:33,
        radioItemsHeight:34
    }); 
    var button = Ti.UI.createButton({
        title:'Get value' 
    });
    button.addEventListener('singletap', function(e) {
        alert("Vertical radioGroup selectedIdx: " + radioGroup2.selectedValue);
    });
    $.radiopicker.add(radioGroup2);
    $.radiopicker.add(button);
})();
$.index.open();

截屏:

不显示标签选项一,二和三.请帮我解决这个问题.我也需要显示标签.

The label option one, two and three are not displaying. Please help me out of this issue. I need to display the labels too.

推荐答案

我已经进行了更新我的模块,它将为您提供所需的结果...您可以在这里获取它:

I've gone ahead and updated my Module which will give you the result you want... You can fetch it here:

https://github.com/yozef/TiRadioButtonGroup

这篇关于在tianium中显示单选按钮标签有问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆