To Lecture Notes

IT 372 -- May 20, 2019

Exam Info

Practice Problems

  1. Create a layout with a button that tests a LongClick Event Handler. Also attach a Click event handler to the button.
    Ans: Here are the XML layout file and the Java activity file. Toasts are shown by the LongClick and Click event handlers at two different y positions.
  2. Research and test the SeekBar widget.
    Ans: Here are the XML layout file and the Java activity file. The SeekBar class is a class derived from ProgressBar, which represents a value by its horizontal position on the bar. This position is the progress attribute. Here are the relevant properties of the SeekBar:

    Attribute Description
    progress Value represented by the seek bar.
    min Minimum progress value of seek bar
    max Minimum progress value of seek bar
  3. How do you change the image in an ImageView widget dynamically? Write an app to test this.
    Ans: See the ShowSuit Example.
  4. Look at the Tourist Info Example that uses a ListView widget.

Setting the App Icon

This section will be discussed on May 27.

Themes

This section will be discussed on May 27.