Skip to content

Instantly share code, notes, and snippets.

@nuno
Created December 20, 2013 02:19
Show Gist options
  • Select an option

  • Save nuno/8049558 to your computer and use it in GitHub Desktop.

Select an option

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

FokkeZB commented Jan 7, 2014

Copy link
Copy Markdown

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

@nuno

nuno commented Jan 10, 2014

Copy link
Copy Markdown
Author

FokkeZB, that's correct!

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