Determining Favorite Place Feature Layout Updates

Recall that the fields displayed on the settings screen are encapsulated within a ScrollView control. This makes it easy to add a new setting at the bottom of the screen. The favorite place feature will function much like the date of birth and password settings.

To incorporate the favorite place design changes into the / res/layout/settings. xml layout file, you need to add a new region to the settings screen below the gender Spinner control.

You begin by adding a TextView control to display the label of the new setting. Then you add an inner LinearLayout control with a Button control to launch the dialog and a TextView control to display the resulting Favorite Place name.

Figure 14.2 shows the layout updates required by the favorite place feature.

LinearLayout (Vertical)

(Other Settings Like Gender Spinner)


("Favorite Place:")

LinearLayout (Horizontal)


(Launch Place Picker Dialog)

(Show Place Name String)

The settings screen layout updates required for the favorite place feature.

Was this article helpful?

0 0

Post a comment