From the course: Android Development Essential Training: 2 User Interface Design
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 - Android Tutorial
From the course: Android Development Essential Training: 2 User Interface Design
Display image resources
- [Instructor] In Android, one way to display an image is by using the image view component. Let's add one to our empty layout file and explore some of its properties. We'll drag it over from the pallet, and then we'll just place it here inside of our parent constraint layout. When we drag it over, we're presented with a dialogue that allows us to pick the image that we want displayed inside of our image view. We're going to choose the avatar image that's part of the sample data. This is useful for helping us to position our view, but when we run the app, it's not actually displayed to users. Let's click on okay, and now we see our avatar displayed inside the image view. When we open up the attributes pane, notice how under srcCompat field it's actually referenced as an array. You can randomly provide another value to this array index in order to try out additional placeholders. For example, I'm going to change the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Display image resources5m 10s
-
(Locked)
Load image resources at runtime6m 16s
-
(Locked)
Reduce file size with WebP images4m 26s
-
(Locked)
Use XML-based VectorDrawable images4m 37s
-
(Locked)
Create icons in Android Studio4m 45s
-
(Locked)
Challenge: Load a network image2m 43s
-
(Locked)
Solution: Load a network image1m 48s
-
(Locked)
-
-