function initUI() { if (args.height) $.view.height = args.height; else { $.view.height = '45dp'; // we need to set this, or he error&tip view can break the widget } if (args.width) $.view.width = args.width; if (args.left) $.view.left = args.left; if (args.right) $.view.right = args.right; if (args.top) $.view.top = args.top; if (args.backgroundColor) $.view.backgroundColor = args.backgroundColor; //if(args.title) $.titleLbl.text = args.title; //if(args.hintText) $.field.hintText = args.hintText; //if(args.value) $.field.value = args.value; //if(args.tipText) $.tipText.text = args.tipText; if (args.title) $.lblHintText.text = args.title; if (args.iconFont) { $.lblHintIcon.text = args.iconFont; $.field.right = '25dp'; } //Ti.API.info('args: ' + JSON.stringify(args)); Scope.setupField({ params : args, control : $.field }); }
function initUI(){ //not icon? move the title to the left if(!args.icon){ $.titleLbl.left = $.icon.getView().left; }else{ $.icon.setIcon(args.icon); if(args.iconColor) $.icon.getView().color = args.iconColor; } $.titleLbl.text = args.title || ''; $.field.hintText = args.hintText || ''; $.field.value = args.value || ''; $.alertIcon.getView().opacity = 0; Scope.setupField({params:args, control:$.field}); }