我正在开发具有类似“画廊应用程序”外观的应用程序。当我单击图库中的图像时...我想将图像适合整个屏幕..我使用了此代码..但它不起作用。你能指导我吗?这是相同的代码:
Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
imgView.setMinimumWidth(width);
imgView.setMinimumHeight(height);
imgView.setMaxWidth(width);
imgView.setMaxHeight(height);