Placing Your Widget on the Home screen

The usability experts on the Android team did a great job by allowing application widgets to be easily added to the Home screen. Adding a widget to the Home screen is super easy. Follow these steps:

  1. Long-press the Home screen on the emulator by clicking the left mouse button on the Home screen and keeping the mouse button pressed.
  2. When the Add to Home Screen dialog box is visible, select Widgets, as shown in Figure 8-10.
  3. When the Choose Widget dialog box is visible, choose Screen Brightness Toggle, as shown in Figure 8-11.

Figure 8-10: The Add to Home Screen view.

image

Figure 8-11: The Choose Widget view.

image

You have now added the Screen Brightness Toggle widget to your Home screen, as shown in Figure 8-12. You can tap the icon to change the brightness mode, and the background will change accordingly, as shown in Figure 8-2.

Figure 8-12: The app widget added to the Home screen.

image

Get Android™ Tablet Application Development For Dummies® 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.