Skip to content

Instantly share code, notes, and snippets.

@joshualambert
Created October 15, 2012 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshualambert/3893492 to your computer and use it in GitHub Desktop.
Save joshualambert/3893492 to your computer and use it in GitHub Desktop.
Used to delete a row.
var row = Titanium.UI.createTableViewRow({
height:'50dp',
width:'100%',
layout:'absolute'
});
var rowView = Ti.UI.createView({
left:'0dp',
top:'0dp',
width:'230dp',
height:'100%',
backgroundColor:'transparent',
layout:'horizontal'
});
row.add(rowView);
if (contactField.type == 'PhoneNumber' || contactField.type == 'EmailAddress') {
// Only create an edit row listener if a row has a valid edit type.
row.addEventListener('touchend', function(e) {
row.remove(rowView);
var rowView = Ti.UI.createView({
left:'0dp',
top:'0dp',
width:'230dp',
height:'100%',
backgroundColor:'red',
layout:'horizontal'
});
row.add(rowView);
});
// Only create an edit row listener if a row has a valid edit type.
row.rightImage = 'images/tableArrow.jpg';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment