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.
- [Instructor] 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.…There's a popular, open source library,…for exactly these tasks.…It's named ButterKnife.…It was created by a developer named Jake Wharton,…and it's licensed under Apache License 2.0.…To add the ButterKnife library to your project,…go to the Project Structure dialog.…
Select the app module,…and click Dependencies.…Then click plus on the top right on Windows,…or below this pane on Mac,…and choose Library Dependency.…Type butterknife, all one word, lower case,…and press Enter or Return.…Select whatever is the most recent version.…I'm working with version 8.5.1.…For the moment, you can ignore all the sub-packages.…Just choose the version that ends with butterknife.…Click OK.…
Now click plus again,…and Library Dependency,…type butterknife again,…and this time, choose the item that ends with compiler.…
David also shows how to send and receive broadcast messages that let you exchange data and notifications among the different tiers of your application. He demonstrates how to work with menus and the action bar, add a navigation drawer to a layout, and tackle advanced navigation techniques. Later courses in the Essentials series concentrate on other specific skills you can master.
- Working with events
- Handling events with Java objects and lambda expressions
- Managing navigation
- Sending data to an activity
- Opening other apps with implicit intents
- Sending and receiving broadcast messages
- Working with menus and the action bar
- Adding a navigation drawer
- Advanced navigation techniques
- Removing activities from the back stack