A (175)

(Tuis.) #1

406 CHAPTER 11: Digital Video: Streaming Video, MediaPlayer, and MediaController classes



  1. Once you click the OK and the Finish buttons, you will get an empty
    PlayVideo.java tab opened up for you in Eclipse. Next, copy and paste the
    first four lines of the on Create( ) method from the MainActivity class inside
    of the PlayVideo class (inside of the curly brackets which contain the class’s
    code), and then change the activity_main reference in the setContentView( )
    method call to activity_play as shown in Figure 11-5.


Figure 11-4. Fill out a New Java Class dialog and a Superclass Selection dialog to create a new PlayVideo class


Figure 11-5. Create a standard protected void onCreate( ) method referencing the activity_play in setContentView

Free download pdf