1.4 Views
Wait a second, it seems like XML files give us everything we need to display an application on a screen! Did we really need that code to change the TextView text to "Hello Friend"? Well, declaring the attributes inside the XML for a static TextView seems fine, but when we start to look at more complex View elements, we’ll need corresponding logic to control how these components work.

Important views, such as the ones seen above, that you’ll see used often include:
(1)
EditTextfor inputting and editing text(2)
Buttonand other clickable elements for supporting interactive behavior(3)
TextViewfor displaying text(4)
ImageViewfor displaying images
In sections 2.4 and 2.5, we will go in depth into two particular views that handle user interactions: input controls and buttons.
Last updated
Was this helpful?