Example #1
0
        void Initialize(Video video)
        {
            var inflater = (LayoutInflater)this.Context.GetSystemService(Context.LayoutInflaterService);
            var view     = inflater.Inflate(Resource.Layout.VideoItem, this, true);

            var title = view.FindViewById <TextView>(Resource.Id.title);

            title.Text = video.Title;

            var playButton = view.FindViewById <ImageButton>(Resource.Id.playButton);

            playButton.Click += (sender, e) =>
            {
                PlayVideo?.Invoke(this, video);
            };

            var removeButton = view.FindViewById <ImageButton>(Resource.Id.removeButton);

            removeButton.Click += (sender, e) =>
            {
                RemoveVideo?.Invoke(this, video);
            };
        }
Example #2
0
 private void OnPlayVideo(PlayVideoEventArgs eventArgs)
 {
     PlayVideo?.Invoke(this, eventArgs);
 }