libgdx/libgdx — pull request #64 by aspic (2012-10-12 15:32:06+00:00)
Title: Added a list created by using tables.

I needed a list which can hold arbitrary items. This list is kinda inspired by the list in Android (and its list adapter). It creates a table for each row item, so it would be more memory demanding than the standard List widget.

One requirement is that this list adapter must be passed in the constructor, if not the list won't know what to do with its items. Some standard behavior could be added later though.

A scrolling effect could be added by wrapping the list in a ScrollPane, though this has not been tested. A change listener can be added to the list in order to detect what items are selected.
Basic usage:

```java
ListAdapter adapter = new ListAdapter() {
@Override
public Table setupRow(String item) {
Table t = new Table();
// Generate a simple Label and add that to the table
t.add(Assets.getInstance().getLabel(item, "default")).fill().expand();
return t;
}
};

TableList list = new TableList(adapter, new String[]{"item1", "item2"}, skin);
stage.add(list);
```

I hope this is something that could be usable for others as well. :-)