public void onRestoreInstanceState(Bundle savedInstanceState){
  mSelectedPositions.addAll(savedInstanceState.getIntegerArrayList(TAG));
  Log.d(TAG,"Restore selection " + mSelectedPositions);
}

public void onRestoreInstanceState ( Bundle savedInstanceState ) { mSelectedPositions . addAll ( savedInstanceState . getIntegerArrayList ( TAG ) ) ; Log . d ( TAG , "Restore selection " + mSelectedPositions ) ; }
restores the previous state of the selection on the items .
