private int findActivityElement(int activityIndex){
  for (int elementIndex=0; elementIndex < mActivityList.size(); elementIndex++) {
    if (mActivityList.get(elementIndex).mActivityIndex == activityIndex) {
      return elementIndex;
    }
  }
  return -1;
}

private int findActivityElement ( int activityIndex ) { for ( int elementIndex = 0 ; elementIndex < mActivityList . size ( ) ; elementIndex ++ ) { if ( mActivityList . get ( elementIndex ) . mActivityIndex == activityIndex ) { return elementIndex ; } } return - 1 ; }
finds the index of the activityelement corresponding to the given activityindex .
