the code of charpter 3 in the book named Android programming the big nerd ranch guide.