In this video, we'll be using the application Block06 as an example. I'll show you how to display an image and how to use a slider to let the user tune the color of the displayed image. Let's start a new Android project. Name the application Block06. Click Next. Next. Select an Empty Activity. Next. And finish. I will start by setting up the graphical user interface. So I'm building a linear layout, not a relative one, and its orientation will be vertical. I can get rid of this padding here and we can also delete the text view. Okay. Now, in the first row I'll place an image view. The width of this image view will match the width of the content. So, wrap content. As for the height I'll put a zero because I want to use a percentage of the screen not fixed dimensions so instead I need to put an Android weight. And I want to occupy about 20% of the screen so I'll put 2 here. And the second ImageView will be larger. Let's make it right now. The second ImageView will match the width of the screen, the weight will be 0 dp because here again we're going to mention, we're going to set the weight. Android weight, this time will be 8. Okay, now in between the two ImageViews I will set SeekBar. It will match the parent, and the height will wrap the content. I can also specify the maximum value that this SeekBar will allow me to choose, so Android Max. Will be 255. And we'll need to be able to refer to this seekBar from the java code, so let's add also an ID for it. It'll be seekBar_tuner because we'll use it to tune the color of our image. So that's the first image view occupying approximately 20% of the screen. The SeekBar, and this space here is reserved to display another image, but we didn't specify which image yet, so let's do that. In the MainActivity.java I first retrieve a reference to this ImageView, let's call it imageView_large. And I will retrieve it the usual way, using the findViewById method R.id.imageviewlarge. Okay, and now that I've got a reference on the image, I can define which picture I want to be displayed in it, using the setImageResource method, setImageResource. And here I give the ID for my resource. It's R.drawable and drawing. Okay. And now what we need to do is to associate some action with the SeekBar. So, first let's retrieve a reference to the SeekBar. Let's call it tuner. So that would be SeekBar findViewById R.id.SeekBar_tuner, and the listener which allows you to get notified when the user scrolls the SeekBar is called onSeekBarChangeListener. And let's create a new object for that, okay. And here you notice that you have 3 methods that you need to define. This one is called when the user starts touching the SeekBar, and this one when the user stops touching it. And that's where we want to perform some action. But you notice that here we have no clue about the value taken by the SeekBar when the user is done touching it. So that's the reason why we need to use this method as well. This one is called, each time the value changes, you can get this value by using the progress parameter here. So each time the value is changed, we want to remember that in order to be able to use the last picked value here. So let's create an int variable here, lastProgress, okay. And here we can set a lastProgress to the current progress. And when this method is called, we're going to use the value of last progress to adjust the color of our image. So in order to do that we can apply on our image, which is called imageView_Large, we can apply a filter using setColorFilter. And here we can provide a color using it's RGB value. So alpha would be 255 and then for the red value I would put zero, for the green value I would use the value chosen by the user using the seek bar. And for the blue value, let's do, for instance the opposite on this minus lastProgress. Okay, now let's try that on the emulator. While I move the cursor to the right or left, nothing happens except that the last progress variable is changed. And when I release the cursor, then the onStopTrackingTouch method is called and the color filter is applied to the image. In this video I've shown you how to display an image. First, you need to create an ImageView in your graphical user interface. Next, you need to place your image file in the drawable folder of your resource directory. You must make sure that the file name starts with a letter and contains only letters, no capitals, numbers underscore and dot. After that, if you want to specify which image file to associate with your image view in the XML layout file, then you use the source property of the ImageView, and you use the @drawable keyword to reach the image resource. And if you want to do that from your java code, then in that case you use a setImageResource method on your image view, and you use R.drawable.the name of the file.