Skip to content

Instantly share code, notes, and snippets.

@fbencosme
Last active April 24, 2017 19:41
Show Gist options
  • Select an option

  • Save fbencosme/59bb889f47d8404bfc9d6544e9e340c2 to your computer and use it in GitHub Desktop.

Select an option

Save fbencosme/59bb889f47d8404bfc9d6544e9e340c2 to your computer and use it in GitHub Desktop.

Revisions

  1. Fausto Bencosme revised this gist Apr 24, 2017. 1 changed file with 5 additions and 6 deletions.
    11 changes: 5 additions & 6 deletions NetworkHelpers.cs
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,9 @@
    public static class NetworkHelpers
    {

    public static IObservable<T> WithProgressDialog<T>(this IObservable<T> source, Context ctx)
    {
    public static IObservable<T> WithProgressDialog<T>(this IObservable<T> source, Activity act)
    {
    var progress = new AlertDialog.Builder(ctx, SL.TransparentAlert).Create();
    pm.Show();
    return source.Finally(pm.Dismiss);
    var p = new AlertDialog.Builder(act).Create();
    p.Show();
    return source.Finally(p.Dismiss);
    }
    }
  2. Fausto Bencosme created this gist Apr 24, 2017.
    10 changes: 10 additions & 0 deletions NetworkHelpers.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    public static class NetworkHelpers
    {

    public static IObservable<T> WithProgressDialog<T>(this IObservable<T> source, Context ctx)
    {
    var progress = new AlertDialog.Builder(ctx, SL.TransparentAlert).Create();
    pm.Show();
    return source.Finally(pm.Dismiss);
    }
    }