title: how to capture long press event for Listeview item of a ListActivity?
body: <p>lets assume i  have a ListActivity , now i want catch the long press event on a list item , for that i used following block of code (get after googled) but it's not working!!! please help! </p>
  
  <pre><code>            public class InboxActivity extends ListActivity {
  
              this.getListView().setOnLongClickListener(new OnLongClickListener() {
                          @Override
                          public boolean onLongClick(View v) {
                              Toast.makeText(InboxActivity.this, "postion: " +    getListView().getSelectedItemPosition(), Toast.LENGTH_SHORT).show();
                              return true;
                          }
                      });
  
              }
  </code></pre>
  
  <p>I also see some code in online with contextmenu but there i dont get way of getting the position of listItem from where the context menu open.</p>