title: How to get clicked item position from Custom ListView in android?
body: <p>I'm trying to get the position of the custom list view (after sorted from original list position). It is because the database id of the list item matches the position of the listview item. so, i need to get the sorted item's correct position matching the listview item position. I have this code. </p>
  
  <pre><code>@Override
  public Object getItem(int position) {
      // TODO Auto-generated method stub
      return sampleArrayList.get(position);
  }
  
  @Override
  public long getItemId(int position) {
      // TODO Auto-generated method stub
      return position;
  }
  </code></pre>
  
  <p>But i m struck out that i need to get that position into my main activity. Any help is really appreciated and thanks in advance...</p>