//here is code for AsyncTask perform long running background operation in Android.
public class BackGroundTask : AsyncTask
{
private ProgressDialog _progressDialog;
public BackGroundTask(Context context)
{
_context = context;
}
protected override void OnPreExecute()
{
base.OnPreExecute();
_progressDialog = ProgressDialog.Show(_context, " Progressing", "Please wait...");
}
protected override Java.Lang.Object DoInBackground(params Java.Lang.Object[] @params)
{
}
protected override void OnPostExecute(Java.Lang.Object result)
{
base.OnPostExecute(result);
_progressDialog.Hide();
}
public class BackGroundTask : AsyncTask
{
private ProgressDialog _progressDialog;
public BackGroundTask(Context context)
{
_context = context;
}
protected override void OnPreExecute()
{
base.OnPreExecute();
_progressDialog = ProgressDialog.Show(_context, " Progressing", "Please wait...");
}
protected override Java.Lang.Object DoInBackground(params Java.Lang.Object[] @params)
{
}
protected override void OnPostExecute(Java.Lang.Object result)
{
base.OnPostExecute(result);
_progressDialog.Hide();
}
No comments:
Post a Comment