Android developers are always looking for a way to get their work done with less code. Getting references to view objects and setting up event handlers takes a lot of boilerplate code, and you very quickly start wondering if there’s a better way. Butter Knife is an open-source library that can significantly reduce that code.
- [Instructor] Android developers are always looking for…a way to get their work done with less code.…Getting references to view object…and setting up event handlers takes a good bit of…boilerplate code and you very quickly start wondering…if there's a better way.…There's a popular open source library named ButterKnife.…It's available at this web page.…The purpose of ButterKnife is to streamline your code,…moving away from the use of the findViewById method…and toward the use of annotations.…
To get started with ButterKnife, go to this page…and scroll all the way down to the bottom.…Under the Download section, under Gradle,…select and copy these two declarations.…Then go back to Android Studio…and open your Gradle build file for your app module.…Paste those declarations at the bottom…and then re-sync Gradle.…ButterKnife is now available to your application.…
In the main activity class of this application…there are two view references, one for a TextView…and the other for a CoordinatorLayout.…In the onCreate method, there are two equivalent assignments…
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.