Releases: jmartinesp/SwissKnife
New Resource Injection Annotations
- Resource Injection Annotations.
- Bugfixes on
@Parcelable
for Lists and inheritance. - Improved docs 👍
Fixed `@Parcelable` bug, added `@Extra`
- Fixed
@Parcelable
annotation bug with List restoration. - Improved some DSL methods.
- Added
@Extra
annotation. - Added DSL methods for fragments and activities - thanks @melix!
Fixed @Parcelable behavior when used with @SaveInstance
Changes:
- Fixed a bug which caused an StackOverflowError on fragments when
@Parcelable
and@SaveInstance
were used together. - All AST Transformations have been rewritten using
GeneralUtils
class. This produces better code when those transformations are applied and should be translated to better performance. - Updated Groovy version and Groovy plugin.
Fixed an `@InjectViews` bug
Solve yet another bug with lists.
Added `@Parcelable` annotation
@Parcelable
will turn any annotated class into a Parcelable
object, creating and applying all its methods automatically.
Improved method search (again)
Solved more primitive as argument related bugs.
Improved method search
Fixed a bug which caused methods with primitive (int, char, long, etc.) methods impossible to find.
Handle private methods
SwissKnife will now be able to use private methods as @OnBackground
and @OnUIThread
annotated methods.
Added DSL methods
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.
New `@SaveInstance` annotation
Allows you to quickly define which variables should be persisted through configuration changes using saveInstancteState(...)
method.