Things looked quite simple first but in the end the result is not good. I have an image which has a width larger than screen\'s width. So I need to scale it down in my image
use android:scaleType="fitXY"
Use the scaletype which seems best to you ( I guess you like what you see with fitCenter). The additional thing that you must do is
android:adjustViewBounds="true"
in your ImageView.
or you could go with FitXY but sometimes the result is not exactly what you want.
Could you use FitXY? This would work if you knew the size of the area you were putting the image into. CentreInside may also work, I've used this to scale down images, but I think it depends if you've control of the size of the bounding layout element.
You either need to set android:height = "wrap_content" on your outer container, or set static height of TextBox and give ImageView android:weight = "1" so that the ImageView takes remaining space in container.