Running the FindAFriend Activity

Run the FindAFriend Activity in the Android Emulator. You should be greeted with an empty list, as shown in the following illustration. To add your first friend, click the Menu button and select the Add Friend option.

This option launches the custom View you created. Enter a friend's name on the line provided, as shown here, and return to the main Activity by clicking the back arrow on the Emulator.

You should now have a friend's name in the ListView. Click the Menu button again; you clearly have more options now, as shown in this illustration.

Select the Edit Location option. This should bring up your custom control yet again. Enter a coordinate-based location, as shown here.

Finally, return to the main Activity and select the Find Friends option. This should clearly map out your current location in San Francisco and your friend's location off the coast of Africa, respectively.

0 0

Post a comment