Awesome
NOTE: As from Titanium 3.2.0, text shadows will be support for Android, making this widget of little use unless you need to support BlackBerry. I will not maintain this module any further.
Alloy (Shadow) Label Widget
This is a widget for the Alloy MVC framework of Appcelerator's Titanium platform.
The widget provides a replacement for <Label />
to support text shadows on Android & BlackBerry. on iOS and MobileWeb it will return a regular Ti.UI.Label
. On Android & BlackBerry it will provide an auto-size Ti.UI.View
wrapping two Ti.UI.Label
's. One for the text and another for it's shadow.
Quick Start
Get it
Download this repository and consult the Alloy Documentation on how to install it, or simply use the gitTio CLI:
$ gittio install nl.fokkezb.label
Use it
Use the widget like you would use a normal <Label />
.
Before: Only showing a shadow on iOS and MobileWeb
```xml
<Alloy>
<Window>
<Label shadowColor="#000" />
</Window>
</Alloy>
```
After: Showing a shadow on all platforms
```xml
<Alloy>
<Window>
<Widget src="nl.fokkezb.label" shadowColor="#000" />
</Window>
</Alloy>
```
Public properties
text
: Set and get the text of theLabel
(s)color
: Set and get the color of theLabel
Public methods
setText()
/getText()
: Set and get the text of theLabel
(s)applyProperties()
: Apply properties to theLabel
(s andView
)animate()
: Animate theLabel
( orView
)
Changelog
- 1.2: Filling width if
left
andright
are given. - 1.1:
- Fix for non autosizing labels
- Fix for callbacks on Android
- Handling
touchEnabled
- 1.0: Initial version