title: Android: Item Click Listener in ListView which is Inside a Dialog
body: <p>i have this code </p>
  
  <pre><code>private ListView event_list;
  event_list = (ListView) open_event_list.findViewById(R.id.events_list);
  loadList(cw.getDate());
  </code></pre>
  
  <p>"cw" is a CalendarView which is clicked, depending on what date u clicked a dialog box will appear containing the ListView... just see picture below
  Inside loadList() method is</p>
  
  <pre><code>Cursor c = dbHelper.retrieveAllEventsWhere(TABLE_NAME, cwdate);
  sched_list = new ArrayList&lt;Schedule&gt;();
  Schedule s;
  c.moveToFirst();
  while(!c.isAfterLast())
  {
      s = new Schedule();
      s.setId(c.getInt(c.getColumnIndex("_id")));
      s.setTitle(c.getString(c.getColumnIndex("title")));
      s.setDescription(c.getString(c.getColumnIndex("desc")));
      s.setTime(c.getLong(c.getColumnIndex("time")));
      s.setType(c.getString(c.getColumnIndex("type")));
  
      if(c.getInt(c.getColumnIndex("alarm")) == 1)
          s.setAlarm(true);
      else
          s.setAlarm(false);
      Log.d("dbcheck", s.toString());
      sched_list.add(s);
      c.moveToNext();
  }
  dbHelper.close();
  Log.d("dbcheck", "==============================");
  for(Schedule sc: sched_list)
  {
      Log.d("dbcheck", sc.toString());
  }
  ScheduleAdapter schedListAdapter = new ScheduleAdapter(this, R.layout.schedule_list_item, sched_list);
  event_list.setAdapter(schedListAdapter);
  
  event_list.setOnItemClickListener(new OnItemClickListener() {
  
  public void onItemClick(AdapterView&lt;?&gt; arg0, View v, int arg2,
          long arg3) {
      TextView sched_id = (TextView) v.findViewById(R.id.sched_id);
  
      Toast toast = Toast.makeText(ScheduleActivity.this, sched_id.getText().toString(), Toast.LENGTH_SHORT);
      toast.show();
  
  }
  });
  </code></pre>
  
  <p>So my problem is when i click an item on the ListView which is inside a Dialog box, it does nothing, i can't click or it isn't clickable nothing happens as the picture states</p>
  
  <p><img src="https://i.stack.imgur.com/3DnpK.png" alt="enter image description here"></p>