ButterKnife 8.0.1配置
ButterKnife 8.0.1配置
我家有宝 发表于2年前
ButterKnife 8.0.1配置
  • 发表于 2年前
  • 阅读 129
  • 收藏 1
  • 点赞 2
  • 评论 0

腾讯云 新注册用户 域名抢购1元起>>>   

ButterKnife 更新了,增加了资源绑定,并且将 compiler 分离了出来,引用方式做了改变。

buildscript { repositories { mavenCentral() } dependencies { classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' } }

apply plugin: 'com.neenbedankt.android-apt'

dependencies { compile 'com.jakewharton:butterknife:8.0.1' apt 'com.jakewharton:butterknife-compiler:8.0.1' }

Change Log

Version 8.0.1 (2016-04-27)

  • Fix: ProGuard rules now prevent obfuscation of only types which reference ButterKnife annotations.
  • Eliminate some of the generated machinery when referenced from final types.

Version 8.0.0 (2016-04-25)

  • @Bind becomes @BindView and @BindViews (one view and multiple views, respectively).

  • Calls to bind now return an Unbinder instance which can be used to null references. This replaces the unbind API and adds support for being able to clear listeners.

  • New: @BindArray binds String, CharSequence, and int arrays and TypeArray to fields.

  • New: @BindBitmap binds Bitmap instances from resources to fields.

  • @BindDrawable now supports a tint field 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'
    
  • New: apply overloads which accept a single view and arrays of views.

  • ProGuard rules now ship inside of the library and are included automatically.

  • @Optional annotation is back to mark methods as being optional.

共有 人打赏支持
粉丝 9
博文 67
码字总数 46410
×
我家有宝
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: