上司がAndroidQueryを使用する必要があると言ったので、次のサイトを見つけました:http ://code.google.com/p/android-query/wiki/ImageLoading しかし、私は次のことを試しました。
aq.id(R.id.image1).image("http://www.vikispot.com/z/images/vikispot/android-w.png");
私のコードでは、「aqを解決できません」というエラーが発生します。そのaqを初期化するにはどうすればよいですか、libをインポートする必要がありますか?
これは私のリストビューアダプタです。publicstaticclassListViewAdapterWall extends BaseAdapter {private LayoutInflater mInflater;
public ListViewAdapterWall(Context context) {
mInflater = LayoutInflater.from(context);
}
public int getCount() {
return ListviewContentWall.size();
}
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
ListContent holder;
if (convertView == null) {
convertView = mInflater.inflate(R.layout.listviewinflate, null);
holder = new ListContent();
holder.wallImage = (ImageView) convertView
.findViewById(R.id.wallImage1);
holder.wallButton = (ImageButton) convertView
.findViewById(R.id.wallButton1);
convertView.setTag(holder);
} else {
holder = (ListContent) convertView.getTag();
}
AQuery aq = new AQuery(convertView);
aq.id(R.id.wallImage1).image("http://www.vikispot.com/z/images/vikispot/android-w.png");
//holder.wallImage.setBackgroundDrawable(ListviewContentWall.get(position));
//holder.wallButton.setBackgroundDrawable(ListviewContentWall.get(position));
//holder.text2.setText(ListviewContent2.get(position));
return convertView;
}