protected void remove(int itemPosition){
  if (itemPosition >= 0 && itemPosition < getItemCount()) {
    list.remove(itemPosition);
  }
}

protected void remove ( int itemPosition ) { if ( itemPosition >= 0 && itemPosition < getItemCount ( ) ) { list . remove ( itemPosition ) ; } }
remove an item from the adapter ' s list .
