YouTube

Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Views

Get Embed Code
14 Languages

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

  1. Step one is about picking
    the views that you want to use.
  2. First I should explain what
    exactly a view an Android is.
  3. Simply put, a view is a rectangle on
    the screen that shows some content.
  4. It can be an image,
    a piece of text or a button or
  5. anything else that the app can display.
  6. Now these individual views make up
    what we call the layout of the screen.
  7. Everything about what you see and
  8. interact with in your app is called
    the user interface, or UI for short.
  9. There are different types of
    views with different names.
  10. A view that shows some
    text is called a TextView.
  11. Here are some examples.
  12. A view that shows an image is called an
    ImageView, and these are some examples.
  13. A view that shows a button is called,
    well, a Button.
  14. These are some examples.
  15. Now, there are many other types of views
    in Android which are really helpful to
  16. use, but we're going to
    focus on these three first.
  17. Earlier I mentioned that every
    view is a rectangle on the screen,
  18. but where are all the rectangles?
  19. Well, technically they're invisible,
    but I will draw them for you so
  20. you can see where the bounds
    of each rectangle is.
  21. As you can see,
  22. every app can be broken down into
    the individual view that make it up.
  23. In other words, a view is the basic
    building block that you use
  24. to build up the layout for your app.
  25. To help you understand the idea of
    views being rectangles on a screen,
  26. here's a situation you may
    be more familiar with.
  27. If you ever use an application
    like paint or Google drawings
  28. then you may have added a text box to
    the canvas, then you type in your text.
  29. If you click outside of it though,
  30. you don't see the bounds of
    the rectangle but they are there.
  31. And bounds actually do start
    to matter when you start to
  32. do things like adding
    a background color or
  33. adding a border around it then it
    does matter how big the rectangle is.
  34. I also want to point out that the format
    of these view names is in camel case.
  35. Camel case means that there are no
    spaces in-between words, and
  36. the beginning of each
    word is capitalized.
  37. The reason why it's called
    camel case is because
  38. the outline of the word goes up and
    down like the humps of a camel's back.
  39. You're going to be seeing camel
    case more throughout this course.
  40. Okay, let's practice what you learned.
  41. This is a screen shot of the new
    email app from Google, called Inbox.
  42. Can you identify the different
    types of views here?
  43. To help you,
    I've highlighted the individual views.
  44. For example for A,
  45. can you tell me if it's a TextView,
    an ImageView, or a Button.
  46. Do the same for B,
    as well as the rest of the views.