English subtitles

← XML Syntax - Solution

Get Embed Code
13 Languages

Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. The answer to the first question is that
    the XML element name is here, TextView.
  2. It follows the open angle bracket.
  3. Then, all the attributes are below
    the XML element name, and
  4. I've underlined
    the attribute names here.
  5. They're on the left hand
    side of the equal sign.
  6. They include android:text,
    android:textColor, and so on.
  7. If you put the attribute values, like
    Happy Birthday or the color/white or
  8. black, that's incorrect, because
    those are the attribute values, and
  9. it's asking for the names.
  10. The last question is,
    on what line number is a tag closed?
  11. Then we see the forward slash and
  12. the closing angle bracket on
    the last line, which is line 6.
  13. This means that it's a self-closing tag,
  14. because we open the text view tag
    here and then we close it right away.