protected void ToggleEditing()
        {
            if (EditingOn)
            {
                SavePhotoData();
                _tiltCorrectorButton.SetImageResource(Resource.Drawable.ic_edit);
                EditingOn = false;
            }
            else
            {
                _tiltCorrectorButton.SetImageResource(Resource.Drawable.ic_save);
                EditingOn = true;

                TutorialDialog.ShowTutorial(this, TutorialPart.PhotoEditActivity,
                                            new TutorialPage[] {
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_heading_correction, textResourceId = Resource.String.Tutorial_PhotoEdit_HeadingCorrection
                    },
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_horizont_correction, textResourceId = Resource.String.Tutorial_PhotoEdit_HorizontCorrection
                    },
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_viewangle_correction, textResourceId = Resource.String.Tutorial_PhotoEdit_ViewAngleCorrection
                    },
                });
            }
        }
        protected override void OnStart()
        {
            base.OnStart();

            /* Display thumbnail first (this is not needed probably)
             * if (_photodata.Thumbnail != null)
             * {
             *  var bitmap = BitmapFactory.DecodeByteArray(_photodata.Thumbnail, 0, _photodata.Thumbnail.Length);
             *  MainThread.BeginInvokeOnMainThread(() => { photoView.SetImageBitmap(bitmap); });
             * }*/

            if (_firstStart)
            {
                TutorialDialog.ShowTutorial(this, TutorialPart.PhotoShowActivity,
                                            new TutorialPage[]
                {
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_photoedit_save, textResourceId = Resource.String.Tutorial_PhotoShow_Save
                    },
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_photoedit_share, textResourceId = Resource.String.Tutorial_PhotoShow_Share
                    },
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_photoedit_crop, textResourceId = Resource.String.Tutorial_PhotoShow_Crop
                    },
                    new TutorialPage()
                    {
                        imageResourceId = Resource.Drawable.tutorial_photoedit_tilt, textResourceId = Resource.String.Tutorial_PhotoShow_Tilt
                    },
                }, () => { _firstStart = false; });
            }
        }
Beispiel #3
0
 public static void ShowTutorial(Context context, TutorialPart tp, TutorialPage[] tutorialPages, Action onTutorialFinished = null)
 {
     if (AppContextLiveData.Instance.Settings.IsTutorialNeeded(tp))
     {
         IsInProgress = true;
         var dialog = new TutorialDialog(context, tp, tutorialPages, onTutorialFinished);
         dialog.Show();
     }
     else
     {
         onTutorialFinished?.Invoke();
     }
 }