Skip to content

Added DSL methods

Compare
Choose a tag to compare
@jmartinesp jmartinesp released this 26 Jan 10:06
· 130 commits to master since this release

Added DSL methods such as:

view(R.id.my_view)

To quickly load a view - as using findViewById(...), or:

onClick(Closure closure)

To add an OnClickListener callback to an item and execute the closure's code on click event, or:

asListView(R.id.list_view, R.layout.list_row, Iterable<T> items, Closure toDoOnAdapter)

This will create an ArrayAdapter using the provided items, inflate R.layout.list_row views, execute what's on the closure as the getView(...) code on the adapter and attach it to the ListView provided.