Karamunting.Android.MrEram.ShowCaseView 1.0.4

MREram's ShowCaseView

The ShowcaseView library is designed to highlight and showcase specific parts of apps to the user with a attractive and flat overlay.

There is a newer version of this package available.
See the version list below for details.
Install-Package Karamunting.Android.MrEram.ShowCaseView -Version 1.0.4
dotnet add package Karamunting.Android.MrEram.ShowCaseView --version 1.0.4
<PackageReference Include="Karamunting.Android.MrEram.ShowCaseView" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Karamunting.Android.MrEram.ShowCaseView --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Note: please refer to the original mreram's tutorial.

using Android.App;
using Android.OS;
using Android.Support.V7.App;
using Android.Views;
using Android.Widget;
using SmartDevelop.Ir.Eram.ShowCaseViewLib;
using R = ShowCaseViewDemo.Resource;

namespace ShowCaseViewDemo
{
    [Activity(Label = "@string/app_name", MainLauncher = true, WindowSoftInputMode = SoftInput.StateHidden)]
    public class MainActivity : AppCompatActivity
    {
        private GuideView _guideView;
        private GuideView.Builder _builder;

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(R.Layout.activity_main);

            var view1 = FindViewById(R.Id.view1);
            var view2 = FindViewById(R.Id.view2);
            var view3 = FindViewById(R.Id.view3);
            var view4 = FindViewById(R.Id.view4);
            var view5 = FindViewById(R.Id.view5);

            _builder = new GuideView.Builder(this)
                .SetTitle("Guide Title Text")
                .SetContentText(
                    "Guide Description Text\n .....Guide Description Text\n .....Guide Description Text .....")
                .SetGravity(GuideView.Gravity.Center)
                .SetTargetView(view1)
                //.SetGuideListener(new GuideView.GuideListener(
                //    view =>
                //    {
                //        switch (view.Id)
                //        {
                //            case R.Id.view1:
                //                _builder.SetTargetView(view2).Build();
                //                break;
                //            case R.Id.view2:
                //                _builder.SetTargetView(view3).Build();
                //                break;
                //            case R.Id.view3:
                //                _builder.SetTargetView(view4).Build();
                //                break;
                //            case R.Id.view4:
                //                _builder.SetTargetView(view5).Build();
                //                break;
                //            case R.Id.view5:
                //                return;
                //        }

                //        _guideView = _builder.Build();
                //        _guideView.Show();

                //        Toast.MakeText(this, "Invoke Guide Listener with `new GuideView.GuideListener()`", ToastLength.Short).Show();
                //    }
                //))
                .SetGuideListener(
                    view =>
                    {
                        switch (view.Id)
                        {
                            case R.Id.view1:
                                _builder.SetTargetView(view2).Build();
                                break;
                            case R.Id.view2:
                                _builder.SetTargetView(view3).Build();
                                break;
                            case R.Id.view3:
                                _builder.SetTargetView(view4).Build();
                                break;
                            case R.Id.view4:
                                _builder.SetTargetView(view5).Build();
                                break;
                            case R.Id.view5:
                                return;
                        }

                        _guideView = _builder.Build();
                        _guideView.Show();

                        Toast.MakeText(this, "Invoke Guide Listener with `Action<View>`", ToastLength.Short).Show();
                    }
                );

            _guideView = _builder.Build();
            _guideView.Show();
        }
    }
}

Note: please refer to the original mreram's tutorial.

using Android.App;
using Android.OS;
using Android.Support.V7.App;
using Android.Views;
using Android.Widget;
using SmartDevelop.Ir.Eram.ShowCaseViewLib;
using R = ShowCaseViewDemo.Resource;

namespace ShowCaseViewDemo
{
    [Activity(Label = "@string/app_name", MainLauncher = true, WindowSoftInputMode = SoftInput.StateHidden)]
    public class MainActivity : AppCompatActivity
    {
        private GuideView _guideView;
        private GuideView.Builder _builder;

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(R.Layout.activity_main);

            var view1 = FindViewById(R.Id.view1);
            var view2 = FindViewById(R.Id.view2);
            var view3 = FindViewById(R.Id.view3);
            var view4 = FindViewById(R.Id.view4);
            var view5 = FindViewById(R.Id.view5);

            _builder = new GuideView.Builder(this)
                .SetTitle("Guide Title Text")
                .SetContentText(
                    "Guide Description Text\n .....Guide Description Text\n .....Guide Description Text .....")
                .SetGravity(GuideView.Gravity.Center)
                .SetTargetView(view1)
                //.SetGuideListener(new GuideView.GuideListener(
                //    view =>
                //    {
                //        switch (view.Id)
                //        {
                //            case R.Id.view1:
                //                _builder.SetTargetView(view2).Build();
                //                break;
                //            case R.Id.view2:
                //                _builder.SetTargetView(view3).Build();
                //                break;
                //            case R.Id.view3:
                //                _builder.SetTargetView(view4).Build();
                //                break;
                //            case R.Id.view4:
                //                _builder.SetTargetView(view5).Build();
                //                break;
                //            case R.Id.view5:
                //                return;
                //        }

                //        _guideView = _builder.Build();
                //        _guideView.Show();

                //        Toast.MakeText(this, "Invoke Guide Listener with `new GuideView.GuideListener()`", ToastLength.Short).Show();
                //    }
                //))
                .SetGuideListener(
                    view =>
                    {
                        switch (view.Id)
                        {
                            case R.Id.view1:
                                _builder.SetTargetView(view2).Build();
                                break;
                            case R.Id.view2:
                                _builder.SetTargetView(view3).Build();
                                break;
                            case R.Id.view3:
                                _builder.SetTargetView(view4).Build();
                                break;
                            case R.Id.view4:
                                _builder.SetTargetView(view5).Build();
                                break;
                            case R.Id.view5:
                                return;
                        }

                        _guideView = _builder.Build();
                        _guideView.Show();

                        Toast.MakeText(this, "Invoke Guide Listener with `Action<View>`", ToastLength.Short).Show();
                    }
                );

            _guideView = _builder.Build();
            _guideView.Show();
        }
    }
}

  • MonoAndroid 7.0

    • No dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0 134 2/14/2019
1.0.4 404 1/25/2018