Skip to content

FokkeZB/nl.fokkezb.label

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Titanium Alloy

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 gitTio

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 the Label(s)
  • color: Set and get the color of the Label

Public methods

  • setText()/getText(): Set and get the text of the Label(s)
  • applyProperties(): Apply properties to the Label(s and View)
  • animate(): Animate the Label ( or View)

Changelog

  • 1.2: Filling width if left and right are given.
  • 1.1:
    • Fix for non autosizing labels
    • Fix for callbacks on Android
    • Handling touchEnabled
  • 1.0: Initial version

License

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.

About

The widget provides a replacement for <Label /> to support text shadows on Android & BlackBerry.

Resources

Stars

Watchers

Forks

Packages

No packages published