@Override
public View getView(int position, View convertView, ViewGroup parent) {
View layout = convertView;
if (convertView == null) {
layout = inflater.inflate(R.layout.complex1, null);
AphidLog.d("created new view from adapter: %d", position);
}
final Travels.Data data = travelData.get(position % travelData.size());
UI.<TouchImageView> **findViewById**(layout, R.id.photo).setImageBitmap(
IO.readBitmap(inflater.getContext().getAssets(),
data.imageFilename));
return layout;
}
查找视图按 ID 中出错。我不知道。帮我解决。有显示:
未为类型 Contacts.Intents.UI
定义方法 findViewById(View, int)
而不是使用finViewById()
layout.findViewById()
,它将通过View layout
上的ID搜索View
。