public SoundCloudTrack remove(int trackIndex){
  SoundCloudTrack removedTrack=null;
  ArrayList<SoundCloudTrack> tracks=mSoundCloudPlaylist.getTracks();
  if (trackIndex >= 0 && trackIndex < tracks.size()) {
    removedTrack=tracks.remove(trackIndex);
    if (tracks.size() == 0) {
      mCurrentTrackIndex=0;
    }
 else     if (trackIndex == tracks.size()) {
      mCurrentTrackIndex=(mCurrentTrackIndex - 1) % tracks.size();
    }
 else     if (trackIndex >= 0 && trackIndex < mCurrentTrackIndex) {
      mCurrentTrackIndex=(mCurrentTrackIndex - 1) % tracks.size();
    }
  }
  return removedTrack;
}

public SoundCloudTrack remove ( int trackIndex ) { SoundCloudTrack removedTrack = null ; ArrayList < SoundCloudTrack > tracks = mSoundCloudPlaylist . getTracks ( ) ; if ( trackIndex >= 0 && trackIndex < tracks . size ( ) ) { removedTrack = tracks . remove ( trackIndex ) ; if ( tracks . size ( ) == 0 ) { mCurrentTrackIndex = 0 ; } else if ( trackIndex == tracks . size ( ) ) { mCurrentTrackIndex = ( mCurrentTrackIndex - 1 ) % tracks . size ( ) ; } else if ( trackIndex >= 0 && trackIndex < mCurrentTrackIndex ) { mCurrentTrackIndex = ( mCurrentTrackIndex - 1 ) % tracks . size ( ) ; } } return removedTrack ; }
remove a track from the soundcloud player playlist . < p / > if the track is currently played , it will be stopped before being removed .
