Models

A canvas typically has a collection of Canvas elements, each representing a section of the Business Model Canvas. For the sake of simplicity, these classes contain only the most basic information.

The most important models used in the app are the Canvas and the CanvasElement models. Both the Canvas and CanvasElement classes implement the Parcelable interface. This will make it easier to pass (complex) objects to each fragment:

 
public class Canvas implements Parcelable { 
    private String id; 
    public List<CanvasElement> ELEMENTS; 
    public Canvas(){ 
        ELEMENTS = new ArrayList<>(); 
    } 
    public void setId(String value){ 
        this.id= value; 
    } 
    public String getId(){ 
        return this.id; 
    } 
    ... 
The CanvasElement class and the JSON object found in the template ...

Get Lean Mobile App 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.