SwissKnife v1.1.1 Release Notes

Release Date: 2015-01-26 // over 7 years ago
  • ➕ 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.