8Creating User Interfaces with Layouts and Widgets
In this chapter, you will learn more about layouts and widgets while adding a crime’s date and status to CriminalIntent.
Upgrading Crime
Open Crime.java and add two new fields. The Date field represents the date a crime occurred. The boolean field represents whether the crime has been solved.
Listing 8.1 Adding more fields to Crime
(Crime.java
)
public class Crime { private UUID mId; private String mTitle; private Date mDate; private boolean mSolved; public Crime() { mId = UUID.randomUUID(); ...
Get Android Programming: The Big Nerd Ranch Guide 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.