Skip to content

Instantly share code, notes, and snippets.

@nuno
Created December 20, 2013 02:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nuno/8049558 to your computer and use it in GitHub Desktop.
Save nuno/8049558 to your computer and use it in GitHub Desktop.
FontAwesomeJS for Titanium to be work with: Labels and Buttons. Read first FokkeZB's documentations about the subject, just works :) https://github.com/FokkeZB/FontAwesomeJS
Alloy.Globals.fa = require('fa');
".mylabel": {
color: 'red',
font: { fontFamily: 'FontAwesome', fontSize: 20 },
text: Alloy.Globals.fa.list // IMPORTANT do not delete this property
}
".mybtn": {
color: 'blue',
font: { fontFamily: 'FontAwesome', fontSize: 20 },
title: Alloy.Globals.fa.checkCircle // IMPORTANT do not delete this property
}
<Alloy>
<Window id="index">
<Label class="mylabel" top="80" /><!-- IMPORTANT do not set text="" atribute inline, that is defined in .tss file -->
<Button class="mybtn" top="150" /><!-- IMPORTANT do not set title="" atribute inline, that is defined in .tss file -->
</Window>
</Alloy>
@FokkeZB
Copy link

FokkeZB commented Jan 7, 2014

the button works, but not when places in a navigation/tool-bar

@nuno
Copy link
Author

nuno commented Jan 10, 2014

FokkeZB, that's correct!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment