function FirstView() { var self = Ti.UI.createView(); var text = "welcome wo shi hao ren ,,1,,llllllll"; var attr = Titanium.UI.createAttributedString({ text: text, attributes: [{ type: Titanium.UI.ATTRIBUTE_LINK, value: "www.xxxx.com", range: [text.indexOf("welcome"), ("welcome").length] }] }); var label = Ti.UI.createLabel({ color: '#000000', height: 20, width: 200, attributedString: attr }); label.addEventListener('link', function(e) { alert(e); }); self.add(label); return self; } in android the event is not working
↧
use ti 4.1.0 , event link on label not working
↧