Skip to content

Custom ListViews

grantges edited this page May 7, 2014 · 1 revision

id: com.appcelerator.ui.listview

This widget includes several "out-of-the-box" list view UI concepts for use within Appcelerator mobile applications.

##Platform Support

  • iOS

##Features

  • Product List

Quick Start

The Appcelerator ListView Widget is easy to incorporate into your existing code base.

Using the Alloy.createWidget() function you can add pass in your callback functions that will be triggered by the widget on associated button clicks based on the screen the user is currently on.

#!javascript

/**
 * Create an instance of the login widget
 */
var productListView = Alloy.createWidget('com.appcelerator.login', 'productList');

/**
 * Add the widget to your view
 */
$.index.add(productListView.getView());

/**
 * Add data items to the list view
 */
TODO ADD TEXT HERE

OR you can add the widget to your parent controller using the standard XML syntax as well. Callback function attributes are optional.

#!xml
<!-- Declaration within the XML file -->
<Widget id="listView" src="com.appcelerator.ui.listview" view="productList" />

Future Work

  • Android Compatability
  • Add more custom views

Change Log

  • v1.0 - initial widget creation

Other Resources

Clone this wiki locally