Now that you have created the Screen Brightness Toggle application inside Eclipse, you can begin to design the application's user interface. Because the user interface is the part of your application with which your users interact, you must make this area of the application as quick and responsive as possible in all regards.
For the Screen Brightness Toggle application, all you need is a single button centered in the middle of the screen to toggle the screen brightness. Directly below the button you can include some text that lets the user know whether the tablet is in regular daytime mode or in night mode. (See Figures 6-2 and 6-3, respectively.)
All layout files for your application are stored in the res/layouts directory of your Android project in Eclipse. Android Development Tools (ADT) creates a default layout file when you create a new application. When you created the Screen Brightness Toggle application, the ADT created a file in the res/layouts directory named main.xml.
Open that file by double-clicking it, and the XML code appears ...