Skip to content

appcelerator-se/nl.fokkezb.pullToRefresh

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

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

About

Widget to implement a table pull-to-refresh header in Titanium Alloy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published