delete unnecessary view activity related codes