我在使用picasso库的应用程序中使用了尺寸为1080 * 1920的图像,但是图像没有水平覆盖整个视图。这里是毕加索图像不覆盖应用程序背景的全宽
private void initBackgroundImage() {
ImageView background = (ImageView) findViewById(R.id.iv_background);
Picasso.with(this).load(R.drawable.background).resize(70,120).centerCrop().into(background);
}
我已经尝试了不同的宽度和高度调整大小的方法,但不能够覆盖所有的视图代码。
你在imageview的设置规模类型? –
[将图像调整为使用Picasso的全宽和固定高度]可能的副本(https://stackoverflow.com/questions/20823249/resize-image-to-full-width-and-fixed-height-with-picasso) –