title: how do i add checkbox in simple adapter
body: <p>This is my code below which used simple adapter in the grid view. Every thing  is work fine but i want to add checkbox in my code so what do i do? how i add checkbox in my simple adapter? I  my code check if file is directory show icon other wise show images. I just want to add checkbox so user select checkbox and delete checkbox selected multiple images</p>
  
  <pre><code> SimpleAdapter simpleAdapter;
   GridView gridView;
  
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  
  File photos = new File(getFilesDir(),"photos");
  photos.mkdirs();
  
  File root1 = new File("/data/data/com.myexample.folder/files/");
  
   currentParent = root1;
  currentFiles = root1.listFiles();
  
    currentFilePath = new String[currentFiles.length];
    int count = 0;
  
   for(File f:currentFiles)
   {   
  currentFilePath[count] = f.getAbsolutePath();
   count++;
  }
  
  
   gridView =(GridView)findViewById(R.id.grid);
   gridView.setOnItemClickListener(new OnItemClickListener(){
  public void onItemClick(AdapterView&lt;?&gt; parent, View view, int 
  position,long id) {
  
  
   if(currentFiles[position].isDirectory())
   {
      root = new File("/data/data/com.myexample.folder
     /files/"+FileName(currentFilePath[position])+"/");
  
      Log.e("Root first",root+ " ");
  
      currentFiles = root.listFiles();
  
      inflateListView(currentFiles);
   }
  else if(currentFiles[position].isFile())
  {
        inflateListView(currentFiles);    
             }
  
   private void inflateListView(File[] files){
  
  List&lt;Map&lt;String,Object&gt;&gt; listItems = new ArrayList&lt;Map&lt;String,Object&gt;&gt;();
  
  for(int i=0;i&lt;files.length;i++)
  {       
  Map&lt;String, Object&gt; listItem = new HashMap&lt;String, Object&gt;();
  
  if(files[i].isDirectory())
  {
      listItem.put("icon", R.drawable.folder);
  }
  else
  {
      listItem.put("icon", R.drawable.file);
  }
  
  listItem.put("fileName", files[i].getName());
  listItems.add(listItem);
  }
  
  simpleAdapter=new SimpleAdapter(this,listItems,R.layout.line,new String[] 
  {"icon","fileName"},new int[]{R.id.icon,R.id.file_name});
   gridView.setAdapter(simpleAdapter);
  </code></pre>