我打電話UIL的displayImage
方法,但它不接受圖像URI加載GridView的圖像。這是我的代碼getView
。我發現了錯誤:無法從抽拉使用通用圖像裝載機
UnsupportedOperationException: UIL doesn't support scheme(protocol) by default [2130837504]. You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final ViewHolder holder;
if (convertView == null) {
convertView = mLayoutInflater.inflate(R.layout.grid_view_card_layout, parent, false);
holder = new ViewHolder();
holder.participantName = (TextView) convertView.findViewById(R.id.grid_model_name);
holder.participantCountry = (TextView) convertView.findViewById(R.id.grid_country_name);
holder.participantImage = (ImageView) convertView.findViewById(R.id.grid_model_image);
holder.progressBar = (ProgressBar) convertView.findViewById(R.id.progress);
convertView.setTag(holder);
} else {
holder=(ViewHolder)convertView.getTag();
}
applyTypeFace(convertView);
holder.participantName.setText(ParticipantName[position]);
holder.participantCountry.setText(ParticipantCountry[position]);
//holder.participantImage.setImageResource(ImageId[position]);
//Here lies the problem
ImageLoader.getInstance()
.displayImage(String.valueOf(ImageId[position]), holder.participantImage);
return convertView;
}
任何幫助,請?
'將String.valueOf( 「繪製://」 +圖像標識[位置])'工作!謝謝 :) – 2014-09-11 09:06:12