Mobile Zone is brought to you in partnership with:

Alec is a Content Curator at DZone. He lives in Raleigh and spends his free time writing and programming. Alec is a DZone Zone Leader and has posted 505 posts at DZone. You can read more from them at their website. View Full User Profile

Using the Butter Knife View "Injection" Library in Android Studio and IDEA

02.17.2014
| 3823 views |
  • submit to reddit

We wrote a few months ago about Jake Wharton's Android view "injection" library called Butter Knife. For those using Android Studio or IntelliJ IDEA, there is now a plug-in from Inmite Developers that might help you save some more time. They call it ButterKnifeZelezny, after the Czech javalin thrower, and it generates Butter Knife injections from XML layouts. It looks pretty useful, and straightforward, too.

You can find some information on Inmite's Google Plus announcement, but if you're interested, you might as well head straight to the GitHub and check it out. They've included instructions to help you get set up, teach you how to use it, and even show you how to build the code. Don't forget, you'll need Butter Knife first - you can get it from Jake Wharton's GitHub.