public void changeItemIconAtPosition(int itemIndex,int newIcon){
  if (itemIndex < 0 || itemIndex > spaceItems.size()) {
    throwArrayIndexOutOfBoundsException(itemIndex);
  }
 else {
    SpaceItem spaceItem=spaceItems.get(itemIndex);
    RelativeLayout textAndIconContainer=(RelativeLayout)spaceItemList.get(itemIndex);
    ImageView spaceItemIcon=(ImageView)textAndIconContainer.findViewById(R.id.space_icon);
    spaceItemIcon.setImageResource(newIcon);
    spaceItem.setItemIcon(newIcon);
    changedItemAndIconHashMap.put(itemIndex,spaceItem);
  }
}

public void changeItemIconAtPosition ( int itemIndex , int newIcon ) { if ( itemIndex < 0 || itemIndex > spaceItems . size ( ) ) { throwArrayIndexOutOfBoundsException ( itemIndex ) ; } else { SpaceItem spaceItem = spaceItems . get ( itemIndex ) ; RelativeLayout textAndIconContainer = ( RelativeLayout ) spaceItemList . get ( itemIndex ) ; ImageView spaceItemIcon = ( ImageView ) textAndIconContainer . findViewById ( R . id . space_icon ) ; spaceItemIcon . setImageResource ( newIcon ) ; spaceItem . setItemIcon ( newIcon ) ; changedItemAndIconHashMap . put ( itemIndex , spaceItem ) ; } }
change item icon if space navigation already set up
