title: How to select/deselect all checkBox?
body: <p>I have an adapter with an imageview,a textView and a Checkbox and a button "Select all" for selecting all the checkbox. I searched a lot about how can I do this (select all checkbox) but it not worked. Can anyone explain more what should I do? Please...I have to do this urgent</p>
  
  <p>Here is my adapter :</p>
  
  <pre><code>Public class LazyAdapter1 extends BaseAdapter {
  
          private Activity activity;
          private String[] data;
          private String[] nume;
          private LayoutInflater inflater=null;
          public ImageLoader imageLoader; 
  
          public LazyAdapter1(Activity a, String[] d, String[] f) {
              activity = a;
              data=d;
              nume=f;
              inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              imageLoader=new ImageLoader(activity.getApplicationContext());
          }
  
          public int getCount() {
              return data.length;
          }
  
          public Object getItem(int position) {
              return position;
          }
  
          public long getItemId(int position) {
              return position;
          }
  
          public class ViewHolder{
              public TextView text;
              public ImageView image;
              public CheckBox ck;
          }
  
  
  
          public View getView(int position, View convertView, ViewGroup parent) {
              View vi=convertView;
              ViewHolder holder;
              if(convertView==null){
                  vi = inflater.inflate(R.layout.item, null);
                  holder=new ViewHolder();
                  holder.text=(TextView)vi.findViewById(R.id.text);;
                  holder.image=(ImageView)vi.findViewById(R.id.image);
                  holder.ck=(CheckBox)vi.findViewById(R.id.chkbox);
                  vi.setTag(holder);
              }
              else
                  holder=(ViewHolder)vi.getTag();
  
              holder.text.setText(nume[position]);
              holder.image.setTag(data[position]);
              imageLoader.DisplayImage(data[position], activity, holder.image);
              return vi;
          }
      }
  </code></pre>
  
  <p>Thanks in advance.</p>