Establishing the AllowanceOverviewFragment

The allowance overview will be presented as a card at the top of an overview screen. The overview card will be populated by a new Fragment class that will encapsulate the first part of the data binding. The AllowanceOverviewFragment will depend on the data binding system to do most of the heavy lifting, and will provide the layout binding with a special AllowanceOverviewPresenter object that can be queried for statistics and data. The AllowanceOverviewPresenter will, in turn, reference the Allowance object, and listen for any changes on it in order to update and cache the statistics data. The relationship between these entities can be best explained with the following diagram:

Encapsulating the ...

Get Hands-On Android UI Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.