An Alloy widget creates an icon label using Google material icons .
This is a widget for the Alloy MVC framework of Appcelerator's Titanium platform.
The widget provides a simple Google material icons support for labels.
- Full support for all Google material icons.
- Refer to icons by their name like "star" , "radio_button_checked".
- It can be styled like a normal label.
- Supported events.
-
Use
gittio install abada.materialicons
to install via gitTio or:-
Download the latest release of the widget.
-
Unzip the folder to your project under
app/widgets/abada.materialicons
. -
Add the widget as a dependency to your
app/config.json
file:```javascript "dependencies": { "abada.materialicons":"*" } ```
-
Put MaterialIcons-Regular.ttf under
app/assets/fonts
.
Style it like a normal label. To generate a icon just write the name of the icon and it will automatically be generated.
index.xml
<Alloy> <Window> <Widget id="mystar" src="abada.materialicons" color="red" icon="star" size="100" onClick="clickMe" /> </Window> </Alloy>
Copyright 2016 Abada Henno Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-