From the course: Android Development Essential Training: The User Interface with Kotlin

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Display image resources

Display image resources - Android Tutorial

From the course: Android Development Essential Training: The User Interface with Kotlin

Start my 1-month free trial

Display image resources

- [Instructor] In order to display an image in an Android app, you can use either the image component which is passive and only displays the image, or the image button which displays the image and can be treated as a button. The user can touch or click it to make something happen. For this demonstration I'm going to stick with the simpler component, the image view. And I'm going to drag and drop the image view into my screen from the palette. When you drop it, this resources dialogue appears, and if you have any image files in your project already, you can choose one of them, or you can choose one of these avatars, or scenic backgrounds to work with while you're designing the screen. These images are provided in Android studio, but they only show up in Android studio. If you deploy your application to a device you won't see them. I'll choose the avatars collection, I'll uncheck the use as set option, and I'll choose this cat image. Now I want to place the image view on the screen, by…

Contents