Time for action - creating a recipe viewer application

You'll notice that the following example doesn't use an XML layout resource, but rather creates the entire Activity in Java. In this example we use a Recipe object to generate HTML code into a StringBuilder for display. It's a simple but effective implementation. However, it requires that the Java code be modified if a change to the look and feel of the recipe is required.

  1. Create a new project to contain the recipe reader application:
    android create project -n RecipeViewer -p RecipeViewer -k com.packtpub.viewrecipe -a ViewRecipeActivity -t 3
    
  2. Create a new Ingredient.java source file in the root package of the new application to hold information for a single required ingredient, and open this ...

Get Android User Interface Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.