Skip to content

Releases: jmartinesp/SwissKnife

New Resource Injection Annotations

28 May 18:24
Compare
Choose a tag to compare
  • Resource Injection Annotations.
  • Bugfixes on @Parcelable for Lists and inheritance.
  • Improved docs 👍

Fixed `@Parcelable` bug, added `@Extra`

05 Apr 15:56
Compare
Choose a tag to compare
  • 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

26 Jan 10:16
Compare
Choose a tag to compare

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

26 Jan 10:13
Compare
Choose a tag to compare

Solve yet another bug with lists.

Added `@Parcelable` annotation

26 Jan 10:13
Compare
Choose a tag to compare

@Parcelable will turn any annotated class into a Parcelable object, creating and applying all its methods automatically.

Improved method search (again)

26 Jan 10:11
Compare
Choose a tag to compare

Solved more primitive as argument related bugs.

Improved method search

26 Jan 10:10
Compare
Choose a tag to compare

Fixed a bug which caused methods with primitive (int, char, long, etc.) methods impossible to find.

Handle private methods

26 Jan 10:09
Compare
Choose a tag to compare

SwissKnife will now be able to use private methods as @OnBackground and @OnUIThread annotated methods.

Added DSL methods

26 Jan 10:06
Compare
Choose a tag to compare

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

26 Jan 09:57
Compare
Choose a tag to compare

Allows you to quickly define which variables should be persisted through configuration changes using saveInstancteState(...) method.