Ejemplo n.º 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_animation);
            counter = 0;

            var textView1 = FindViewById<TextView>(Resource.Id.animation_textView);
            var textView2 = FindViewById<TextView>(Resource.Id.animation_textView2);
            var textView3 = FindViewById<TextView>(Resource.Id.animation_textView3);

            showcaseView = ShowcaseView.InsertShowcaseView(new ViewTarget(FindViewById(Resource.Id.animation_textView)), this);
            showcaseView.OverrideButtonClick((s,e) =>
            {
                switch (counter)
                {
                    case 0:
                        showcaseView.SetShowcase(new ViewTarget(textView2), true);
                        break;

                    case 1:
                        showcaseView.SetShowcase(new ViewTarget(textView3), true);
                        break;

                    case 2:
                        showcaseView.SetShowcase(null);
                        showcaseView.SetText("Look ma!", "You don't always need a target to showcase");

                        SetAlpha(0.4f, new View[]{textView1, textView2, textView3});
                        break;

                    case 3:
                        showcaseView.Hide();
                        SetAlpha(1.0f, new View[]{textView1, textView2, textView3});
                        break;
                }
                counter++;
            });

            if (Build.VERSION.SdkInt >= BuildVersionCodes.Honeycomb)
            {
                enableUp();
            }
        }
Ejemplo n.º 2
0
        // Internal insert method so all inserts are routed through one method
        static ShowcaseView InsertShowcaseViewInternal(ITarget target, Activity activity, String title, String detail, ConfigOptions options)
        {
            var sv = new ShowcaseView(activity);

            sv.ConfigurationOptions = options;

            if (sv.ConfigurationOptions.Insert == INSERTTODECOR)
            {
                ((ViewGroup)activity.Window.DecorView).AddView(sv);
            }
            else
            {
                ((ViewGroup)activity.FindViewById(Android.Resource.Id.Content)).AddView(sv);
            }

            sv.SetShowcase(target);
            sv.SetText(title, detail);

            return(sv);
        }
Ejemplo n.º 3
0
        // Internal insert method so all inserts are routed through one method
        static ShowcaseView InsertShowcaseViewInternal(ITarget target, Activity activity, String title, String detail, ConfigOptions options)
        {
            var sv = new ShowcaseView(activity);
            sv.ConfigurationOptions = options;

            if (sv.ConfigurationOptions.Insert == INSERTTODECOR)
            {
                ((ViewGroup)activity.Window.DecorView).AddView(sv);
            }
            else
            {
                ((ViewGroup)activity.FindViewById(Android.Resource.Id.Content)).AddView(sv);
            }

            sv.SetShowcase(target);
            sv.SetText(title, detail);

            return sv;
        }
 public ShowcaseViewBuilder SetShowcaseNoView()
 {
     showcaseView.SetShowcase(null);
     return(this);
 }