Last active
August 29, 2015 14:17
-
-
Save diogosapessoa/7afda70d240a5aa0d9e5 to your computer and use it in GitHub Desktop.
Native Android Progressbar with Xamarin.Forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ILoad | |
{ | |
object ShowProgress (string title, string message); | |
void DismissProgress (object progress); | |
} | |
[assembly: Xamarin.Forms.Dependency (typeof (AndroidLoad))] | |
public class AndroidLoad : Java.Lang.Object, ILoad | |
{ | |
public AndroidLoad () {} | |
public object ShowProgress (string title, string message) | |
{ | |
return ProgressDialog.Show (Forms.Context, title, message, true) as object; | |
} | |
public void DismissProgress (object progress) | |
{ | |
ProgressDialog dialog = progress as ProgressDialog; | |
dialog.Dismiss (); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment