http://www.cnblogs.com/bcbr/articles/4268276.html
需求是,imageview 宽度充满屏幕,高度自适应
首先,需要给你的ImageView
imageView.setAdjustViewBounds(true);
imageView.setScaleType(ScaleType.FIT_XY);
LayoutParams params = new LayoutParams(screenWidth, LayoutParams.WRAP_CONTENT);
imageView.setLayoutParams(params);
设置了setMaxWidth setMaxHeight后setAdjustViewBounds才有效
imageView.setMaxWidth(screenWidth);
imageView.setMaxHeight(screenWidth * 10);