Advanced Android Development
Expand the user experience
This unit covers how to extend your apps to improve the user experience. Learn how to use fragments, widgets, and sensors.
Each lesson in Unit 1 is independent of the other lessons in this unit. For example, you can do the sensors lesson without completing the fragments and widgets lessons.
Lesson 1: Fragments
This lesson explains when, why, and how to use fragments. You learn how to include a fragment in your activity's UI, either by including it statically or dynamically. You also learn how an activity communicates with fragments. You implement a typical scenario for fragments by building an app that has a master/detail layout.
Lesson 2: App widgets
Learn about app widgets, which are miniature app views that appear on the Android home screen. Discover how to add widgets to your project, handle update requests, and make widgets interactive.
Lesson 3: Sensors
Learn how to use the Android sensor framework to get data from device sensors such as the accelerometer and geomagnetic field sensor. Build an app that responds to tilting the device.