GithubHelp home page GithubHelp logo

ti.loader's Introduction

Ti.Loader

com.caffeinalab.titanium.loader

Titanium Widget to display a loader mask.

Proudly inspired to https://github.com/FokkeZB/nl.fokkezb.loading, with some edits for Android (using ProgressIndicator instead Ti.UI.Window)

image

Installation

Via Gittio

gittio install com.caffeinalab.titanium.loader

Via Github

Download the latest release, and add in your config.json, under dependencies:

"dependencies": {
    "com.caffeinalab.titanium.loader": "*"
}

Fully stylable via TSS

#cfn_LoaderMask

The outer mask (Window)

#cfn_LoaderView

The mask containing the loader

#cfn_LoaderLabel

The label containing the text

Watch the window.tss/window.xml file for all options and override the rules with ID instead of class.

Usage

// Create a global reference to the widget
var LO = Alloy.createWidget('com.caffeinalab.titanium.loader', {
	message: "Test",
	cancelable: true,
	useImages: false
});

// show the loader

// Equivalent to { message: 'Loading...', messageRelevance: 1 }
LO.show('Loading...');

LO.show({
	message: 'Wait..',
	messageRelevance: 3,
	cancelable: true
});

// hide the loader
LO.hide();

Constructor options

message (String)

The message to display

messageRelevance (Number, default: 0)

Continuous updates to the message will respect the messageRelevance property.

cancelable (Boolean, default: true)

If is a Function, this will be called on cancel. Set to false to prohibit user cancelation of the mask.

API

show([opt])

Show the mask extending the constructor options with the arguments.

show([message])

This is equivalent to show({ message: [message] })

hide()

Closes the mask.

ti.loader's People

Contributors

kopiro avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.