Getting Started

Import CS496_Lab06.zip into Eclipse (Import->General->Existing Projects into Workspace->Archive File).

You should see source code for an activity named Salutation.

Your Tasks

Absolute View Layout

Create a layout for the view in activity_main.xml (inside the res/layout directory) to create a layout similar to

image

Hint: For the CheckBoxes, consider placing them inside a nested LinearLayout with horizontal orientation to have them displayed side by side. Be sure to consider what the appropriate extent settings are for each widget.

Spinner Resource

In strings.xml (in the res/values directory), add the following resources:

Activity Code

Add code in Salutation.java for the following:

Hint: Recall that to display a Toast message:

Toast.makeText(Salutation.this, msg, Toast.LENGTH_SHORT).show();

Relative View Layout

Once you have the absolute layout app working, modify the UI to use some relative layouts to produce the view as shown below:

image

You should not need to change any of the activity code.

Hints: