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.
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.
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 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>
```
text
: Set and get the text of theLabel
(s)color
: Set and get the color of theLabel
setText()
/getText()
: Set and get the text of theLabel
(s)applyProperties()
: Apply properties to theLabel
(s andView
)animate()
: Animate theLabel
( orView
)
- 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
Copyright 2013 Fokke Zandbergen 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.