我在使用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) –