title: How to make items clickable in list view?
body: <p>I have been trying to search for a solution, but with very little success.
  I have to display a <strong>pop up window</strong> containing a list of items. 
  I was able to display the window but <strong>onitemclicklistener</strong> is not being called upon clicking an item in the <strong>list view</strong>. Any help with this issue would be greatly appreciated.</p>
  
  <p>Thanks</p>
  
  <p>Edit1:</p>
  
  <pre><code>public class PopUpWindowActivity extends Activity {
  
      /** Called when the activity is first created. */
      String[] countries = new String[] {
          "India", "USA", "Canada"
      };
  
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          LinearLayout ll = new LinearLayout(this);
          ListView lv = new ListView(this);
          lv.setAdapter(new ArrayAdapter &lt; String &gt; (this, android.R.layout.simple_list_item_1, countries));
          lv.setOnItemClickListener(new OnItemClickListener() {
  
                  public void onItemClick(AdapterView &lt;? &gt; arg0, View arg1, int arg2,
                      long arg3) {
                      Log.v("clicked", (String)((TextView) arg1).getText());
                  }
  
              });
          ll.addView(lv);
          setContentView(ll);
      }
  }
  </code></pre>
  
  <p>In the above code, i tried to create a layout inside which i added a list view. This makes the list view no longer clickable. I have to do this because, i am trying to implement a pop up window inside which there should be multiple items along with a list view.</p>