title: Android: ListView click event not working using SimpleAdapter
body: <p>In my app i am trying to set TextView as Strikethrough while clicking on list item. But Listview clik item is not working.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>    listView = ( ListView ) findViewById(R.id.listview);
      SimpleAdapter adapter = new SimpleAdapter( this, aList, R.layout.add_list_detail, 
                     new String[] { "txt", "cur" }, new int[] { R.id.txt, R.id.cur } );
      // Setting the adapter to the listView
      listView.setAdapter(adapter);
  
  
      Button btnAdd = (Button) findViewById(R.id.btnAdd);
      btnAdd.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              Intent details = new  Intent(AddNewList.this, AddNewGrocery.class); // Call
              startActivityForResult(details, 1);
          }
         });
      listView.setClickable(true);
  
      listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
            @Override
            public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int position, long arg3) {
  
             // Object o = lv.getItemAtPosition(position);
              /* write you handling code like...
              String st = "sdcard/";
              File f = new File(st+o.toString());
              // do whatever u want to do with 'f' File object
              */  
  
                TextView item = (TextView) arg1.findViewById(R.id.txt);
                item.setPaintFlags(item.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
            }
          });
  
  
           protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  
          if (requestCode == 1) {
              if(resultCode == RESULT_OK){
                  Bundle b = data.getExtras();
                  if ( b!= null ){
                  String strName=data.getStringExtra("name");
                  String strQty=data.getStringExtra("quantity");
                  System.out.println(strName);
                  System.out.println(strQty);
  
  
  
  
  
                  SimpleAdapter adapter = new SimpleAdapter( this, aList, R.layout.add_list_detail, 
                          new String[] { "txt", "cur" }, new int[] { R.id.txt, R.id.cur } );
  
                      HashMap&lt;String, String&gt; hm = new HashMap&lt;String,String&gt;();
  
                      hm.put("txt", strName);
                      hm.put("cur",strQty);
                      aList.add(hm);
  
                  // Keys used in Hashmap
                  String[] from = {"txt","cur" };
  
                  // Ids of views in listview_layout
                  int[] to = {R.id.txt,R.id.cur};
  
  
                  listView.setAdapter(adapter);
                  adapter.notifyDataSetChanged();
  
                  }
              }
              if (resultCode == RESULT_CANCELED) {
                  //Write your code if there's no result
              }
          }
      }
  </code></pre>