Created
March 22, 2019 13:01
-
-
Save MotiurRahman/56dec245d839879f01ff5b15dbf94106 to your computer and use it in GitHub Desktop.
selectionstyle example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var win = Ti.UI.createWindow({ backgroundColor: 'white' }); | |
| var data = [{ | |
| properties: { | |
| title: 'Title', | |
| subtitle: 'Subtitle', | |
| image: 'KS_nav_views.png', // not used by this template | |
| accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE, | |
| selectionStyle: Titanium.UI.iOS.ListViewCellSelectionStyle.BLUE | |
| }, | |
| template: Ti.UI.LIST_ITEM_TEMPLATE_CONTACTS | |
| }, | |
| { | |
| properties: { | |
| title: 'Title', | |
| subtitle: 'Subtitle', | |
| image: 'KS_nav_views.png', | |
| accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_CHECKMARK, | |
| selectionStyle: Titanium.UI.iOS.ListViewCellSelectionStyle.BLUE | |
| }, | |
| template: Ti.UI.LIST_ITEM_TEMPLATE_SETTINGS | |
| }, | |
| { | |
| properties: { | |
| title: 'Title', | |
| subtitle: 'Subtitle', | |
| image: 'KS_nav_views.png', | |
| accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DETAIL, | |
| selectionStyle: Titanium.UI.iOS.ListViewCellSelectionStyle.BLUE | |
| }, | |
| template: Ti.UI.LIST_ITEM_TEMPLATE_SUBTITLE | |
| }, | |
| { | |
| properties: { | |
| title: 'Title', | |
| subtitle: 'Subtitle', // not used by this template | |
| image: 'KS_nav_views.png', | |
| accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE, | |
| selectionStyle: Titanium.UI.iOS.ListViewCellSelectionStyle.BLUE | |
| }, | |
| template: Ti.UI.LIST_ITEM_TEMPLATE_DEFAULT | |
| } | |
| ]; | |
| var listSection = Ti.UI.createListSection({ items: data }); | |
| var listView = Ti.UI.createListView({ sections: [listSection] }); | |
| win.add(listView); | |
| win.open(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment