Now the class extends only a View, instead of an ImageView, since scale types were not being used. Added image attribute to the view.