ButterKnife注解方式 和eventbus 差不多 都很好用

@OnClick(R.id.button) void onButtonClick() {
//TODO implement
Toast.makeText(this, "我靠!", Toast.LENGTH_SHORT).show();
}
toast不显示 把onButtonClick 在onCreate()方法里面调用才行 难道8.1.0需要调用吗?那就失去了意义啊
纠结 后来去github上面 仔细看了看 https://github.com/JakeWharton/butterknife
需要添加一些插件才行
简书 中一位作者解释的也很详细:http://www.jianshu.com/p/0392199a682b
记录一下


06-29号 补记:
ButterKnife 又叫牛油刀 黄油刀。哇咔咔 厉害厉害

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-18
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
  • 2021-06-20
相关资源
相似解决方案