android studio 引入butterknife,GitHub - avast/android-butterknife-zelezny: Android Studio plug-in for ...

ButterKnifeZelezny

Simple plug-in for Android Studio/IDEA that allows one-click creation of Butterknife view injections.

How to install

in Android Studio: go to Preferences → Plugins → Browse repositories and search for ButterKnife Zelezny

or

download it and install via Preferences → Plugins → Install plugin from disk

How to use it

2b2e4ba0a80fd1ded0c5a68521f32a78.gif

Make sure you have latest Butterknife lib on your classpath

Right click on usage of desired layout reference (e.g. R.layout.main in your Activity or Fragment), then Generate and Generate ButterKnife Injections

Pick injections you want, you also have an option to create ViewHolder for adapters.

Click Confirm and enjoy injections in your code with no work!

Contributing

Pull requests are welcomed!

make sure you stick to our coding style.

make sure you have Java 6 installed if you want to publish it in the plugin repository

Common issue: The plugin is not working after I updated to new Android Studio

AS promts you to update plugins after update, you need to update them before using

Make sure you have Butterknife on your classpath

Make sure that your cursor is placed on a layout ID in a class having one of these types: Activity, Fragment, custom View or Adapter

Why 'Zelezny'?

f0ae746be5f818e647851e6edc624ea8.png

Jan Železný is a famous Czech javelin thrower, Olympic champion and world record holder. With Zelezny's javelin, your butter knife will be much sharper!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值