Your code will scale the image, but Android will do a decent job of scaling images to fit the space allotted several ways.
If you place images in folders as described by this link: and making sure each folder has the right size image, the system will pick up the right sized image based on the device it is running on. There are also scaling parameters you can apply to an image (see ImageView.ScaleType for more info)
Also, this link describes how to efficiently load images to conserve memory. This is very useful for loading images into less memory than the full size would require as well as how to load multiple images via asynchronous tasks.