private void MusicControllerKitkat_MediaPlaybackChanged(object sender, MediaPlaybackStateChangedKitkatEventArgs e) { switch (e.PlaybackState) { case RemoteControlPlayState.Paused: btnPlayPause.SetCompoundDrawablesRelativeWithIntrinsicBounds(0, Resource.Drawable.ic_play_arrow_white_24dp, 0, 0); playbackState = PlaybackStateCode.Paused; MoveSeekbar(false); break; case RemoteControlPlayState.Playing: btnPlayPause.SetCompoundDrawablesRelativeWithIntrinsicBounds(0, Resource.Drawable.ic_pause_white_24dp, 0, 0); playbackState = PlaybackStateCode.Playing; MoveSeekbar(true); break; case RemoteControlPlayState.Stopped: btnPlayPause.SetCompoundDrawablesRelativeWithIntrinsicBounds(0, Resource.Drawable.ic_play_arrow_white_24dp, 0, 0); playbackState = PlaybackStateCode.Stopped; MoveSeekbar(false); break; default: break; } }
protected virtual void OnMediaPlaybackChanged(MediaPlaybackStateChangedKitkatEventArgs e) { MediaPlaybackChanged?.Invoke(this, e); }