Simple plug-in for Android Studio/IDEA that allows one-click creation of Butterknife view injections.
- in Android Studio: go to
Preferences → Plugins → Browse repositories
and search forButterKnife Zelezny
or
- download it and install via
Preferences → Plugins → Install plugin from disk
- 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
andGenerate 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!
Pull requests are welcomed!
- make sure you stick to our coding style.
- follow Getting Started with Plugin Development
- make sure you have Java 6 installed if you want to publish it in the plugin repository
- initial project setup might be tricky (like editing iml files manually), don't hesitate to contact @destil if you run into troubles.
- 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 on layout file in Activity on Fragment
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!
See our other Czech personalities who help with #AndroidDev.