Drag and drop support is for iOS only (at least through the Titanium SDK). Further, I don't believe I've seen drag and drop in an Android app for row re-ordering. But I have seen up and down arrows to let you re-order. Below is sample code using a TableView. If you use ListView, the code can be even cleaner (you can use replaceItemsAt to swap the items without updating the whole list).
var win = Ti.UI.createWindow({
backgroundColor: '#fff',
fullscreen: true
});
var data = [];
for(var i = 1; i <= 10; i++) {
var row = Ti.UI.createTableViewRow();
row.add(Ti.UI.createLabel({
text: 'Row ' + i, textAlign: 'left',
width: Ti.UI.FILL, color: '#000'
}));
row.add(Ti.UI.createButton({
title: 'Up', action: 'moveUp',
width: 50, right: 70
}));
row.add(Ti.UI.createButton({
title: 'Down', action: 'moveDown',
width: 50, right: 10
}));
data.push(row);
}
var table = Ti.UI.createTableView({
data: data
});
table.addEventListener('click', function(evt) {
var action = evt.source.action,
index = evt.index,
isFirstRow = index === 0,
isLastRow = index + 1 === data.length;
if(action === 'moveUp' && !isFirstRow) {
swapRows(index, index - 1);
}
else if(action === 'moveDown' && !isLastRow) {
swapRows(index, index + 1);
}
});
win.add(table);
win.open();
function swapRows(indexOne, indexTwo) {
var temp = data[indexOne];
data[indexOne] = data[indexTwo];
data[indexTwo] = temp;
table.data = data;
}