title: Delete Items from ListView in cursoradapter
body: <p>i created a custom list with textbox and image. Image should delete row in database sqlite.</p>
  
  <p>in my fragment activity I am using the query method of sqlitedatabase. </p>
  
  <pre><code>cursor = mSqLiteDatabase.rawQuery("SELECT liked_id as _id, liked_presentation_id FROM liked", null);
  LikedListCursorAdapter likedListCursorAdapter = new LikedListCursorAdapter(getActivity(), cursor);
  lvItems.setAdapter(likedListCursorAdapter);
  </code></pre>
  
  <p>/////////////my cursoradapter</p>
  
  <pre><code>public class LikedListCursorAdapter extends CursorAdapter {
  
  SQLiteDatabase mSqLiteDatabase;
  int idSpeaker,idPresentation;
  TextView textViewName, textViewCompany, textViewTitle, textViewDate, textViewAboutReport;
  LinearLayout linearLayout;
  
     public static ImageView imageViewStatus;
      private DatabaseHelper mDatabaseHelper;
  
  public LikedListCursorAdapter(Context context, Cursor cursor) {
      super(context, cursor);
  
  }
  
  
  @Override
  public View newView(Context context, Cursor cursor, ViewGroup parent) {
      return LayoutInflater.from(context).inflate(R.layout.liked_list, parent, false);
  }
  
  @Override
  public void bindView(View view, final Context context, final Cursor cursor) {
  
      imageViewStatus = (ImageView) view.findViewById(R.id.imageViewStatus);
  
      textViewTitle = (TextView) view.findViewById(R.id.textViewTitle);
      textViewDate = (TextView) view.findViewById(R.id.textViewTime);
  
      idSpeaker = cursor.getInt(cursor.getColumnIndex("_id"));
  
  ///////////////delete item
  
      imageViewStatus.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Log.w("id",String.valueOf(idSpeaker));
              mDatabaseHelper = new DatabaseHelper(context);
  
              mSqLiteDatabase = mDatabaseHelper.getWritableDatabase();
  
              mSqLiteDatabase.delete(mDatabaseHelper.TABLE_LIKED,
                      "liked_id = ?",
                      new String[] {String.valueOf(idSpeaker)});
              cursor.requery();
  
  
              notifyDataSetChanged();
          }
      });
  </code></pre>
  
  <p>however, always remove the last row in the listView. ( position of cursor is last).</p>
  
  <p>I don't know how get current position from listview, when i click. Please, help me </p>