Skip to content

Instantly share code, notes, and snippets.

@guntidheerajkumar
Last active March 30, 2017 07:29
Show Gist options
  • Select an option

  • Save guntidheerajkumar/6f8bef159a080221731f4c371b3796b2 to your computer and use it in GitHub Desktop.

Select an option

Save guntidheerajkumar/6f8bef159a080221731f4c371b3796b2 to your computer and use it in GitHub Desktop.
[assembly: Xamarin.Forms.Dependency(typeof(LoadingService))]
namespace YourNameSpace
{
public class LoadingService : ILoadingService
{
public LoadingService()
{
}
#region ILoadingService implementation
public void Show(string message = "")
{
Device.BeginInvokeOnMainThread(() => {
AndHUD.Shared.Show(Forms.Context, maskType: MaskType.Black);
});
}
public void Hide()
{
Device.BeginInvokeOnMainThread(() => {
AndHUD.Shared.Dismiss(Forms.Context);
});
}
#endregion
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment