I get imageView\'s width 0. Below is code.
xml file :
Since you already have a "fixed" width imageView of 200dp why don't you just put it in dimens.xml
200dp
and then simply
int width = (int) getResources().getDimension(R.dimen.image_Width)