0

我收集了通过 DroidFu 检索的 65x65 像素源图像。我想以 80x80dip 呈现它们,以更好地适应我的 listView 行内容。

鉴于我不想在源(服务器)调整大小,什么是缩放 droidfu WebImageView 的好方法?

@Override
public View getView(int position, View convertView, ViewGroup parent) {
        View v = convertView;
        if (v == null) {
            v = mInflater.inflate(R.layout.my_feed_item_row, null);
        }
        MyFeedItem o = items.get(position);
        if (o != null) {
                TextView line1 = (TextView) v.findViewById(R.id.line1);
                TextView line2 = (TextView) v.findViewById(R.id.line2);
                TextView line3 = (TextView) v.findViewById(R.id.line3);
                TextView line4 = (TextView) v.findViewById(R.id.line4);
                if (line1 != null) {
                      line1.setText(o.getLine1());                            }
                if(line2 != null){
                      line2.setText(o.getLine2());
                }
                if(line3 != null){
                    line3.setText(o.getLine3());
                }
                if(line4 != null){
                    line4.setText(o.getLine4());
                }

                WebImageView rowThumbnail = (WebImageView);
                v.findViewById(R.id.feed_row_thumbnail);
                rowThumbnail.setImageUrl(o.getIconURLString());
                rowThumbnail.loadImage();
        }
        return v;
    }

}
4

1 回答 1

1

检查 webimageview 的代码内部,布局参数已设置为包装内容。将其更改为填充父项

并更改 Scaletype 以适合 xy

于 2012-05-22T12:06:29.397 回答