This demo is an example from book Google Android开发入门与精通.