Inject Views on Android

Have you ever get irritated by the unlimited number of findViewById method calls and complex on-click-listeners? Obviously they increase the complexity of the code and they consume more time as well. Butter Knife is a perfect solution to get out of these irritating and time consuming code segments.

Butter Knife is an injection library used to inject views into Java classes. Using this library is not going to reduce the performance since it uses compile time injection instead of runtime injection. Compared to some other Android libraries and frameworks, it is less featured but personally I like this library a lot for its less configuration and high performance. This article introduces the basic functionalities of Butter Knife and more details can be found at the official website.


Let's create a simple application with a TextBox and a Button to demonstrate the application of Butter Knife.
Read More

Contact Form

Name

Email *

Message *