How to show progress bar in each listview item?

Viewed 16445

please help me out to show the progress dialog in listview item.

public class DealerSubCatListAdapter extends BaseAdapter {
        private Context context;
        private ArrayList<Image> Image;
        private LayoutInflater inflater = null;

        public DealerSubCatListAdapter(Context context, ArrayList<Image> Image) {

            this.context = context;
            this.Image = Image;
            inflater = (LayoutInflater) context
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);


            notifyDataSetChanged();

        }

        @Override
        public int getCount() {
            return Image.size();
        }

        @Override
        public Object getItem(int position) {
            return position;
        }

        @Override
        public long getItemId(int position) {
            return position;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            View view = null;
            if (convertView == null) {
                view = inflater.inflate(R.layout.imagesubcat, null);
            } else {
                view = convertView;
            }

            TextView imagesubcat = (TextView) view.findViewById(R.id.imagesubcattv);
            // tagLine

            imagesubcat.setText(Image.get(position).image_type);

            return view;
        }

    }

So, this is the adapter show the listview item.

4 Answers
Related