Solanki Kamlesh Solanki Kamlesh - 1 year ago 120
Android Question

Listview Image loading Using Aquery

I am using the android query library but it fails to load image in the listview,

So, is there and link or source code available to use the aquery and load the image in listview properly.

Answer Source
public Onadapter(Context context,String[] id,String[] label,String[] title,String[] image,String[] hrs,String[] posted_date)
        this.context=context; = id;
        this.label = label;
        this.title = title;
        this.image = image;
        this.hrs = hrs;

    private class ViewHolder{
        ImageView img;
        TextView id;
        TextView label;
        TextView title;
        TextView hrs;
        TextView posted_date;

    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder = null;

        LayoutInflater mInflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
        if (convertView == null) {
            convertView = mInflater.inflate(R.layout.whatslist, null);
            holder = new ViewHolder();
            holder.img = (ImageView) convertView.findViewById(;
            holder.label= (TextView) convertView.findViewById(;
            holder.title = (TextView) convertView.findViewById(;
            holder.hrs = (TextView) convertView.findViewById(;
            holder.posted_date = (TextView) convertView.findViewById(;

        else {
            holder = (ViewHolder) convertView.getTag();
        imgaq = new AQuery(convertView);[position], true, true, 0, 0, null, AQuery.FADE_IN_NETWORK, 1.0f);
        return convertView;

        public int getCount() {
            // TODO Auto-generated method stub
            return image.length;

        public long getItemId(int position) {
            // TODO Auto-generated method stub
            return position;

        public Object getItem(int position) {
            // TODO Auto-generated method stub
            return null;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download