Open kratsg opened 11 years ago
1, Try this code.
<Widget class="icon" id="test" icon="icon-facebook" src="be.k0suke.fontawesome" />
$.test.getView().addEventListener('click',function(){alert('test');});
$.test.getView().fireEvent('test');
2 and 3, This widget is Ti.UI.Label
. So if you want to use the title of the Ti.UI.Button
, then use the library here. This library to return the character code of icon.
However, the
fireEvent
works just fineSecondary issue is that you can't use the
selectedColor
property (so you can get an icon to sort of act like a button.Third issue is that inserting the widget inside a button like
creates a top padding above the widget.