Android:Butter Knife 8.0.1配置

ButterKnife是一款用于Android视图绑定的库,通过注解处理自动生成代码,帮助开发者消除findViewById调用,简化监听器设置,并支持资源查找等操作。

github地址:https://github.com/GarsonZhang/butterknife

Butter Knife

Logo

Field and method binding for Android views which uses annotation processing to generate boilerplate code for you.

  • Eliminate findViewById calls by using @BindView on fields.
  • Group multiple views in a list or array. Operate on all of them at once with actions, setters, or properties.
  • Eliminate anonymous inner-classes for listeners by annotating methods with @OnClick and others.
  • Eliminate resource lookups by using resource annotations on fields.

 

For documentation and additional information see the website.

Remember: A butter knife is like a dagger only infinitely less sharp.

Download

Add this to you project-level build.gradle:


 

Add this to your module-level build.gradle:


 

Make sure the line apply plugin ... is placed somewhere at the top of the file.

Snapshots of the development version are available in Sonatype's snapshots repository.

转载于:https://www.cnblogs.com/GarsonZhang/p/5582909.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值