title: Listview in Popup menu doesn't work properly
body: <blockquote>
    <p>I have a listview in popup menu, it appears correctly but onitemclicklistener doesn't work for that listview.</p>
  </blockquote>
  
  <pre><code>public String[] pop={"a","b","c","d"};
  </code></pre>
  
  <blockquote>
    <p>My adapter</p>
  </blockquote>
  
  <pre><code>final ArrayAdapter&lt;String&gt; popadapter = new ArrayAdapter&lt;String&gt;(this,
                android.R.layout.simple_list_item_1, pop);
  
  
  public void onClick(View v) {
              popUpView = getLayoutInflater().inflate(R.layout.popup,
                      null); // inflating popup layout
  
  
  
  
              mpopup = new PopupWindow(popUpView, 250, 140);
              mpopup.setAnimationStyle(android.R.style.Animation_Dialog);
              mpopup.showAtLocation(popUpView, Gravity.CENTER, 0, 0);
              mpopup.setTouchable(true);
              mpopup.setFocusable(true);
              mpopup.setOutsideTouchable(true);
              mpopup.setContentView(popUpView);
              ListView lv=(ListView)popUpView.findViewById(R.id.listView1);
              lv.setAdapter(popadapter);
              lv.setOnItemClickListener(new OnItemClickListener() {
  
                  @Override
                  public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1,
                          int arg2, long arg3) {
                      mpopup.dismiss();
                      Toast.makeText(getApplicationContext(),
                              "ok", Toast.LENGTH_SHORT)
                              .show();
                                              // TODO Auto-generated method stub
  
                  }
  
              });
  </code></pre>
  
  <blockquote>
    <p>I can't find the solution</p>
  </blockquote>