Version 8.0.0 (2016-04-25)
@BindViews(one view and multiple views, respectively).
- Calls to
bindnow return an
Unbinderinstance which can be used to
nullreferences. This replaces the
unbindAPI and adds support for being able to clear listeners.
Bitmapinstances from resources to fields.
@BindDrawablenow supports a
tintfield which accepts a theme attribute.
The runtime and compiler are now split into two artifacts.
compile 'com.jakewharton:butterknife:8.0.0' apt 'com.jakewharton:butterknife-compiler:8.0.0'
applyoverloads which accept a single view and arrays of views.
- ProGuard rules now ship inside of the library and are included automatically.
@Optionalannotation is back to mark methods as being optional.
Version 7.0.1 (2015-06-30)
- Fix: Correct
ClassCastExceptionwhich occurred when
@Nullablearray bindings had missing views.
Version 7.0.0 (2015-06-27)
@Optionalhas been removed. Use
@Nullablefrom the ‘support-annotations’ library, or any other annotation named "Nullable".
- New: Resource binding annotations!
R.boolID to a
R.colorID to an
R.dimenID to an
int(for pixel size) or
float(for exact value) field.
R.drawableID to a
R.intID to an
R.stringID to a
- Fix: Missing views will be filtered out from list and array bindings.
- Note: If you are using Proguard, the generated class name has changed from being suffixed with
Version 6.1.0 (2015-01-29)
- New: Support for injecting interface types everywhere that views were previously supported (e.g.,
- Eliminate reflection-based method invocation for injection and resetting. This makes performance slightly faster (although if you are worried about the performance of Butter Knife you have other problems). The only reflection in the library is a single
Class.forNamelookup for each type.
Version 6.0.0 (2014-10-27)
- New: Listeners can bind to the root view being injected by omitting a view ID on the annotation.
- New: Exceptions thrown from missing views now include the human-readable ID name (e.g., ‘button1’).
- Specifying multiple fields binding to the same ID is now considered an error.
findByIdoverload for view lookup on
- Experimental: Click listeners are now globally debounced per frame. This means that only a single click will be processed per frame preventing race conditions due to queued input events.
- Experimental: Multiple methods can bind to the same listener provided that listener’s callback method does not require a return value.
Version 5.1.2 (2014-08-01)
- Report an error if the annotations are on a class inside the
java.*package. Since we ignore these packages in the runtime, injection would never work.
Version 5.1.1 (2014-06-19)
- Fix: Correct rare
ClassCastExceptionwhen unwinding an
Version 5.1.0 (2014-05-20)
- New listener!
@Optionalnow correctly works for
- Fix: Correct erasure problem which may have prevented the processor from running in Eclipse.
Version 5.0.1 (2014-05-04)
- New: Support
Dialogas injection source.
- Fix: Unwrap
InvocationTargetExceptioncauses for more helpful exceptions.
Version 5.0.0 (2014-04-21)
@InjectViewsannotation groups multiple IDs into a
ButterKnife.applymethod applies an
Setter, or Android
Propertyto views in a list.
- New listeners!
- New: Multi-method listener support. Specify a
callbackargument to choose which method the binding is for. (See
@OnItemSelectedfor an example)
- Fix: Support for generic types which are declared with an upper-bound.
- Fix: Use less sophisticated method injection inspection in the annotation processor. The previous method caused problems with some Eclipse configurations.
Version 4.0.1 (2013-11-25)
- Fix: Correct a problem preventing the annotation processor to access Android types when certain
javacconfigurations were used to build.
Version 4.0.0 (2013-11-25)
Views class is now named
- New listeners!
- New: Views are now only checked to be
nullonce if at least one of the fields and/or methods lack the
- Fix: Do no emit redundant casts to
Version 3.0.1 (2013-11-12)
- Fix: Do not emit redundant casts to
Version 3.0.0 (2013-09-10)
- New: Injections are now required. An exception will be thrown if a view is not found. Add
@Optionalannotation to suppress this verification.
Version 2.0.1 (2013-07-18)
- New: Control debug logging via
Version 2.0.0 (2013-07-16)
@OnClickannotation for binding click listeners to methods!
Version 1.4.0 (2013-06-03)
Views.resetfor settings injections back to
nullin a fragment’s
- Fix: Support parent class injection when the parent class has generics.
Version 1.3.2 (2013-04-27)
- Multiple injections of the same view ID only require a single find call.
- Fix: Ensure injection happens on classes who do not have any injections but their superclasses do.
Version 1.3.1 (2013-04-12)
- Fix: Parent class inflater resolution now generates correct code.
Version 1.3.0 (2013-03-26)
- New: Injection on objects that have zero
@InjectView-annotated fields will no longer throw an exception.
Version 1.2.2 (2013-03-11)
- Fix: Prevent annotations on private classes.
Version 1.2.1 (2013-03-11)
- Fix: Correct generated code for parent class inflation.
- Fix: Allow injection on
Version 1.2.0 (2013-05-07)
- Support injection on any object using an Activity as the view root.
- Support injection on views for their children.
- Fix: Annotation errors now appear on the affected field in IDEs.
Version 1.1.1 (2013-05-06)
- Fix: Verify that the target type extends from
- Fix: Correct package name resolution in Eclipse 4.2
Version 1.1.0 (2013-03-05)
- Perform injection on any object by passing a view root.
- Fix: Correct naming of static inner-class injection points.
- Fix: Enforce
findByIdcan only be used with child classes of
Version 1.0.0 (2013-03-05)