I have an activity that has an ImageView defined inside a HorizontalScrollView. The image source is a 9-patch file that is constrained to stretch only the right edge to fill
Also another solution is to set image programmatically as ImageResource and set scaleType
imageView.setImageResource(R.drawable.favorite_driver_icon); imageView.setScaleType(ScaleType.FIT_XY);