Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.79 KB

README.md

File metadata and controls

52 lines (41 loc) · 1.79 KB

PullToRefresh Widget

Overview

The PullToRefresh widget implements the TableView Refresh with headerPullView for Titanium Alloy by Appcelerator.

Features

  • Initialize the widget through one simple call.
  • Change (localize) any of the messages displayed.
  • Localized date and time of last update.

Future work

  • Direct localization calls from within the widget.
  • Callback to check if the widget is allowed to do reload.

Quick Start

  • Download the repository of the widget as a ZIP file.
  • Move the file to your project's root folder.
  • Unzip the file and you'll find the widget under app/widgets/nl.fokkezb.pullToRefresh.
  • Add the widget as a dependency to your app/config.json file like so:
	
	"dependencies": {
		"nl.fokkezb.pullToRefresh":"1.0"
	}
  • Attach the widget to any Ti.UI.TableView like so:
var ptrCtrl = Alloy.createWidget('nl.fokkezb.pullToRefresh', null, {
	table: $.myTable,
	load: myLoadCallback
});
  • In your myLoadCallback notify the widget when you're done loading:

ptrCtrl.reset();

Additonal parameters

The only required parameters are the table and load parameters. You can change the displayed texts using the following additional ones:

Parameter Type Default
msgPull string Pull down to refresh...
msgRelease string Release to refresh...
msgUpdating string Updating...
msgUpdated string Last Updated: %s %s