CS 175/286 - Lecture 2

Cover page image

Cay S. Horstmann

Lecture 2 Quiz 1

Put your answer into Piazza.

What is “detached mode” in Eclipse?

  1. Executing a program without the debugger attached.
  2. A view in a separate window.
  3. A popup that shows content assistance.
  4. A philosophical approach to contemplating the Eclipse framework.

Lecture 2 Quiz 2

What does the author least like about Eclipse?

  1. The plugin architecture.
  2. FindBugs.
  3. Refactoring.
  4. The Run As menu.

Today's Lecture

Layouts

IDs

Build Automation

Reading Before Next Class

Lab

Quiz Question

Goal: Android application that displays a quiz question, like this:

Layout

  1. Make a new project with application and project name lab02 in the package edu.sjsu.cs175.lab02. Remember to put the project into ~/cs175/lab02, not inside the workspace.
  2. Using the graphical layout builder, set up the question text and four answers.
  3. When I did this, I got XML with messy alignment. I wanted the buttons below each other, and each option to the right of its button, aligned on the baseline. I had to fix up a couple of them, and it's pretty likely you will need to do the same. Explain the changes that you made.
  4. Why did you get warning triangles next to each text view? (You don't need to fix them now.)
  5. Run your application. What happens?
  6. Now let's set the strings programmatically, not with the UI builder. Add code to set each textfield so that a different question and different options are displayed. How did you do this?

Build Automation