[TIMOB-12774] Android: implement ListView to work with default Template with views recycling and data binding
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-03-14T05:14:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 3.1.0, 2013 Sprint 05 API, 2013 Sprint 05 |
Components | Android |
Labels | api |
Reporter | Hieu Pham |
Assignee | Hieu Pham |
Created | 2013-02-17T09:40:43.000+0000 |
Updated | 2017-03-09T01:22:01.000+0000 |
Description
Implement listview that works with basic template with view recycling and data binding.
Testing steps :
var section = Ti.UI.createSection();
var listView = Ti.UI.createListView({top: 0, width: 500, sections: [section]});
section.setData([
{title: {text: 'hi', backgroundColor: 'red'},
leftImage: {image: 'appicon.png'}
},
{title: {text: 'hello', backgroundColor: 'blue'},
leftImage: {image: 'appicon.png'}
},
{title: {text: 'row threee', backgroundColor: 'yellow'},
leftImage: {image: 'appicon.png'}
}
]);
var win = Ti.UI.createWindow();
win.add(listView);
win.open();
1. Run this code, you should see a list view with 3 rows.
PR: https://github.com/appcelerator/titanium_mobile/pull/3935
Closing ticket as fixed.