Xamarin.Forms implements AndHud and BTProgressHud

Can someone point me to a Xamarin.forms sample that uses AndHud for Android and BTProgressHud for iOS (or something similar)?

I know that here is an example of ACR-Xamarin-Forms https://github.com/aritchie/acr-xamarin-forms , but it is too complex and completely over my head.

Of course, there is a simpler, more understandable implementation, but if not some guidance on how to start implementing it (for C # and Xamarin beginners)

Thanks in advance

+4
source share
2 answers

iOS. , Android, - IHud, AndHud BTProgressHud.

public interface IHud
{
    void Show();
    void Show(string message);
    void Dismiss();
}

iOS IHud BTProgressHud:

[assembly: Dependency(typeof(Hud))]
namespace project.iOS
{
    public class Hud : IHud
    {
        public Hud ()
        {
        }

        public void Show() {
            BTProgressHUD.Show ();
        }

        public void Show(string message) {
            BTProgressHUD.Show (message);
        }

        public void Dismiss() {
            BTProgressHUD.Dismiss ();
        }
    }
}

, Forms,

    var hud = DependencyService.Get<IHud> ();
    hud.Show ("Loading Vehicles");

    // tasks...

    hud.Dismiss ();
+10

, @jason, :

Xamarin Android

+1

All Articles