title: How to set listener on custom dialog...?
body: <p>I have a custom dialog view having a list view in its content.</p>
  
  <p>I have set a onItemClickListener on the list but its not working...</p>
  
  <p>Can anyone have any idea on this, please help.</p>
  
  <p>here is my code.</p>
  
  <pre><code>dialog = new Dialog(context);
              customDialogAdapter = new CustomDialogListAdapter(context,PaymentInfo.creditCardTypes);
              dialog.setContentView(R.layout.custom_dialog);
              list = (ListView) dialog.findViewById(R.id.custom_list);
              list.setAdapter(customDialogAdapter);           
  
              // Recognizing custom layout parameters.
              list.setOnItemClickListener(new OnItemClickListener() {
                  @Override
                  public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int position,
                          long arg3) {
                      System.out.println("Clicked on list...!");
                      tv = (TextView) arg1.findViewById(R.id.text);
                      radio = (RadioButton) arg1.findViewById(R.id.radio);
                      radio.setChecked(true);
                      System.out.println("You Clicked on "+tv.getText().toString());
                      dialog.dismiss();               
                  }
              });
  </code></pre>
  
  <p>shap shot.</p>
  
  <p><img src="https://i.stack.imgur.com/2Tg3G.png" alt="enter image description here"></p>
  
  <p>Thanks in advance...!</p>