我有有它的高度和宽度设置为FILL_PARENT与LinearLayout中具有同一值的ImageView的。所以,我想这应该设置我的图片以适应屏幕。但它只适合像80%(保证金顶部和底部在横向模式下)。
I have an imageview that has its height and width set to "fill_parent" with a linearlayout that has the same values set. So i suppose this should set my images to fit the screen. But it only fits like 80% (margin top and bottom in landscape mode).
所以,香港专业教育学院尝试了以下code,但没有成功:
So ive tried the following code, without success:
Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
imgView.setMinimumWidth(width);
imgView.setMinimumHeight(height);
imgView.setMaxWidth(width);
imgView.setMaxHeight(height);
任何其他的想法?
Any other ideas?
使用 imgview.setScaleType(ScaleType.FIT_XY);
上一篇:Clojure的Android上Clojure、Andr、oid
下一篇:我怎样才能在非活动类(LocationManager)使用getSystemService?LocationManager、getSystemService