Navigating "up" (as opposed to 'back') must be explicity implemented in the application. It involves enabling the up button in the action bar, handling the resultant event and also declaring the parent/child relationship in the manifest.
Last time we explored briefly navigation within an app. In this session we continue this discussion, with a focus on navigation from the users perspective, looking at how a user can arrive into an app, and also how they may move between apps.
Lambda expressions allow one to treat functionality as a method argument similar to data. This facilitates a terse alternative to anonymous inner classes where the interface contains a single abstract method, such an interface being referred to as a functional interface.
We continue to evolve navigation support in the app, providing an 'up' button in the action bar to allow navigation from the ResidenceActivity to the ResidenceListActivity.
Java 8, initially released in March 2014, is a major upgrade providing many new features one of which we examine here, namely lambda expressions
. We consider situations where such expressions may be used to provide a less verbose alternatitive to anonymous classes.
This is a solution to the event handling lab.