Changes

Jump to: navigation, search
Creating the State Change Example Project
The first step in this exercise is to create the new project. To this end, launch Eclipse and select the File -> New -> Android Application Project. Within the resulting new project dialog, name both the application and project StateChange. Enter the package name using your reverse domain name and the application name as outlined in Creating an Example Android Application (for example com.mycompany.statechange), or use the default com.example temporary name if you do not yet have a domain name. Select the latest SDK for the Minimum SDK Required, Target SDK and Compile With settings.
Continue to click the Next button to work through the screens. On the Configure Project screen, leave the Create custom launcher icon and Create activity options selected. Use the default Android icon on the Configure Launcher Icon screen and make sure BlankActivity is selected on the Create Activity screen. Finally, on the Blank Activity screen, name the Activity StateChangeActivity , and the layout activity_state_change and the fragment fragment_state_change before clicking on Finish.
Upon completion of the project creation process, the StateChange project should be listed in the Package Explorer panel located along the left-hand edge of the Eclipse main window as illustrated in Figure 10-1:
[[Image:android_44_statechange_project.png|The user interface for an Android State Change example app]]
Navigate to StateChange -> res -> layout -> activity_state_changefragment_state_change.xml in the Package Explorer panel and double click on it to load the user interface file for the activity into the Graphical Layout tool.
== Designing the User Interface ==

Navigation menu