A (175)

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

Creating Your activity_play XML UI Design


To get rid of the wavy red error highlight, shown in Figure 11-5, which the pop-up options menu
(interestingly) does not give us a correct solution for fixing (Eclipse is not perfect, as I mentioned
earlier in the book), you will need to right-click on the /res/layout folder and select the New ➤
Android XML File menu sequence. This will open up a New Android XML File dialog, seen in
Figure 11-6, where you’ll name the UI layout activity_play, and select the FrameLayout root
element (parent tag) for your video playback Activity UI design.


Figure 11-6. Create an activity_play.xml UI layout file using a FrameLayout root element


Once you click Finish, you will see the XML markup for the parent container which
Eclipse will write for you, along with the required layout_width and layout_height parameters,
shown in Figure 11-7.

Free download pdf