public ItemViewProperties(int id, int titleResId, int messageResId, ItemViewType itemType, float scale, ShowcaseView.ConfigOptions configOptions) { this.Id = id; this.TitleResId = titleResId; this.MessageResId = messageResId; this.ItemType = itemType; this.Scale = scale; this.ConfigurationOptions = configOptions; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.Main); var adapter = new HardcodedListAdapter(this); listView = FindViewById<ListView>(Resource.Id.listView); listView.Adapter = adapter; listView.ItemClick += delegate(object sender, AdapterView.ItemClickEventArgs e) { switch (e.Position) { case 0: StartActivity(typeof(MultipleShowcaseSampleActivity)); break; case 1: StartActivity(typeof(ShowcaseFragmentActivity)); break; case 2: StartActivity(typeof(AnimationSampleActivity)); break; // Not currently used case 3: StartActivity(typeof(MemoryManagementTesting)); break; } }; DimView(listView); buttonBlocked = FindViewById<Button>(Resource.Id.buttonBlocked); buttonBlocked.Click += delegate { showcaseView.AnimateGesture(0, 0, 0, 400); }; var co = new ShowcaseView.ConfigOptions(); co.HideOnClickOutside = true; // The following code will reposition the OK button to the left. // var layoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent, ViewGroup.LayoutParams.WrapContent); // layoutParams.AddRule(LayoutRules.AlignParentBottom); // layoutParams.AddRule(LayoutRules.AlignParentLeft); // int margin = (int)Resources.DisplayMetrics.Density * 12; // layoutParams.SetMargins(margin, margin, margin, margin); // co.ButtonLayoutParams = layoutParams; var target = new ViewTarget(Resource.Id.buttonBlocked, this); showcaseView = ShowcaseView.InsertShowcaseView(target, this, Resource.String.showcase_main_title, Resource.String.showcase_main_message, co); showcaseView.SetOnShowcaseEventListener(this); }
public ShowcaseViewBuilder SetConfigOptions(ShowcaseView.ConfigOptions configOptions) { showcaseView.ConfigurationOptions = configOptions; return(this); }
protected override void OnResume() { base.OnResume(); if (prefs.GetBoolean("FirstRun", true)) { var vt_btnTutor = new ViewTarget(Resource.Id.btnTutor, this); ShowcaseView.ConfigOptions config = new ShowcaseView.ConfigOptions(); config.IsOneShot = false; config.ShowcaseId = 0; ShowcaseView showcaseView_btnTutor = ShowcaseView.InsertShowcaseView(vt_btnTutor, this, "Tutorial", "Use this section to train by playing a series of notes.", config); var vt_btnTuner = new ViewTarget(Resource.Id.btnTuner, this); config.ShowcaseId = 1; ShowcaseView showcaseView_btnTuner = ShowcaseView.InsertShowcaseView(vt_btnTuner, this, "Tuner", "Use this to tune your guitar.", config); /*NoneOnShowcaseEventListener nosel = new NoneOnShowcaseEventListener(); nosel.OnShowcaseViewDidHide(showcaseView_btnTuner); showcaseView_btnTutor.SetOnShowcaseEventListener(nosel);*/ showcaseView_btnTutor.Show(); prefs.Edit().PutBoolean("FirstRun", false).Commit(); } }
public ItemViewProperties(int id, int titleResId, int messageResId, ItemViewType itemType, ShowcaseView.ConfigOptions configOptions) : this(id, titleResId, messageResId, itemType, DefaultScale, configOptions) { }
public ItemViewProperties(int id, int titleResId, int messageResId, float scale, ShowcaseView.ConfigOptions configOptions) : this(id, titleResId, messageResId, ItemViewType.NotInActionbar, scale, configOptions) { }
public ItemViewProperties(int titleResId, int messageResId, ShowcaseView.ConfigOptions configOptions) : this((int)ItemViewType.NoShowcase, titleResId, messageResId, ItemViewType.NotInActionbar, DefaultScale, configOptions) { }