O'Reilly logo

Android User Interface Development by Jason Morris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required