public override Dialog OnCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder dialog = new AlertDialog.Builder(Activity) .SetTitle(title) .SetPositiveButton("Got it", (sender, args) => { }); LayoutInflater inflater = Activity.LayoutInflater; View view = inflater.Inflate(Resource.Layout.VideoHelpPopup, null); video = view.FindViewById<VideoView>(Resource.Id.helper_video); descriptionView = view.FindViewById<TextView>(Resource.Id.helper_explanation); descriptionView.SetText(description.ToCharArray(),0, description.Length); if (!string.IsNullOrEmpty(videoAdd)) { video.Prepared += VideoPrepared; video.SetVideoURI(Uri.Parse(videoAdd)); video.Touch += VideoTouched; video.SetZOrderOnTop(true); // Removes dimming } else { LinearLayout holder = view.FindViewById<LinearLayout>(Resource.Id.helper_videoHolder); holder.Visibility = ViewStates.Gone; } dialog.SetView(view); return dialog.Create(); }
void OnVideoIsPrepared() { seekVideo.Progress = 0; seekVideo.Max = videoView.Duration; videoView.SetBackgroundColor(Color.Transparent); videoView.Start(); videoView.SetZOrderOnTop(true); videoView.SetZOrderMediaOverlay(true); StartThread(); }