0
我收集了通過DroidFu檢索的65x65像素源圖像。我想在80x80dip上顯示它們以更好地適合我的listView行內容。DroidFu - 縮放/拉伸WebImageView
鑑於我不想在源(服務器)調整大小如何縮放droidfu WebImageView?對於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;
}
}