A (175)

(Tuis.) #1
CHAPTER 11: Digital Video: Streaming Video, MediaPlayer, and MediaController classes 405

Since there is no PlayVideo class as yet, once you make these editing changes, Eclipse will
“throw” a wavy red error highlight underneath the PlayVideo class reference inside of your Intent( )
constructor method call.



  1. Mouse-over this wavy red error highlight and select the first Create class
    ‘PlayVideo’ option, shown circled in red in the screenshot shown in
    Figure 11-3. This will instruct Eclipse ADT to create a “bootstrap” empty
    class for you to use to write your PlayVideo.java Activity subclass.

  2. Before Eclipse can create this class for you, it will need to get some
    information from you regarding what you are going to use the class to do;
    in this case, we’ll use it to create an Activity, so the New Java Class dialog,
    which is shown in Figure 11-4 on the left, will open up. Click the Browse
    button next to the Superclass selector and open up the Superclass
    Selection dialog shown on the right side of Figure 11-4, and select the
    Activity class.


Figure 11-3. Add a second case statement to the switch construct referencing play_video and using a playIntent

Free download pdf