Skip to content

Instantly share code, notes, and snippets.

Joe iEntry jpurcell

  • iEntry Inc
Block or report user

Report or block jpurcell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jpurcell
jpurcell / pull-to-refresh(android).js
Created Apr 5, 2011
Tweetie-like pull to refresh and pull to load more. Note that it requries set heights for everything.
View pull-to-refresh(android).js
// This is the Android version of the Tweetie-like pull to refresh table:
// http://developer.appcelerator.com/blog/2010/05/how-to-create-a-tweetie-like-pull-to-refresh-table.html
var win = Ti.UI.currentWindow;
var alertDialog = Titanium.UI.createAlertDialog({
title: 'System Message',
buttonNames: ['OK']
});
var scrollView = Ti.UI.createScrollView({
@jpurcell
jpurcell / tableview-scroll-change.js
Created Apr 1, 2011
Fire on scroll direction change.
View tableview-scroll-change.js
var scrollingUp = false;
var prevIndex = 1;
Ti.API.debug('init: scrolling down');
tableView.scrollToIndex(1);
tableView.addEventListener('scroll',function(e){
Ti.API.debug('prev '+prevIndex+', curr '+e.firstVisibleItem+', scrollingUp '+scrollingUp);
if (prevIndex > e.firstVisibleItem) {
if (!scrollingUp) {
Ti.API.debug('scrolling up');
@jpurcell
jpurcell / app.js
Created Apr 1, 2011
Debugging for TableView scroll event with Titanium Developer.
View app.js
var win = Ti.UI.currentWindow;
var data = [
{title:"Row 1",color:'#000',height:50},
{title:"Row 2",color:'#000',height:50},
{title:"Row 3",color:'#000',height:50},
{title:"Row 4",color:'#000',height:50},
{title:"Row 5",color:'#000',height:50},
{title:"Row 6",color:'#000',height:50},
{title:"Row 7",color:'#000',height:50},
You can’t perform that action at this time.