Class SimpleProgressTask<Params,Progress,Result>

java.lang.Object
android.os.AsyncTask<Params,Progress,Result>
eltos.simpledialogfragment.SimpleProgressTask<Params,Progress,Result>

public abstract class SimpleProgressTask<Params,Progress,Result> extends android.os.AsyncTask<Params,Progress,Result>
An AsyncTask for use with SimpleProgressDialog Automatically reflects the task's states in the dialog. Created by eltos on 27.05.21.
  • Nested Class Summary

    Nested classes/interfaces inherited from class android.os.AsyncTask

    android.os.AsyncTask.Status
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from class android.os.AsyncTask

    SERIAL_EXECUTOR, THREAD_POOL_EXECUTOR
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
     
    protected void
    Updates the progress dialog by trying to guess the meaning of the supplied parameter(s): - if values is of numeric type - if values[0] < 0, then progress is indeterminate - if values[0] >= 0, then (int) values[0] is set as progress - if values[1] > 0, then (int) values[1] is set as max, otherwise max defaults to 100 - if values[2] >= 0, then (int) values[2] is set as secondary progress - if values is of CharSequence type, then values[0] is set as info text and progress to indeterminate - if values is a Pair of a Number and a String, the above is applied to either value of the pair
    protected void
     

    Methods inherited from class android.os.AsyncTask

    cancel, doInBackground, execute, execute, executeOnExecutor, get, get, getStatus, isCancelled, onCancelled, onCancelled, publishProgress

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SimpleProgressTask

      public SimpleProgressTask()
  • Method Details

    • registerDialog

      protected void registerDialog(SimpleProgressDialog dialog)
    • onPreExecute

      @CallSuper protected void onPreExecute()
      Overrides:
      onPreExecute in class android.os.AsyncTask<Params,Progress,Result>
    • onPostExecute

      @CallSuper protected void onPostExecute(Result result)
      Overrides:
      onPostExecute in class android.os.AsyncTask<Params,Progress,Result>
    • onProgressUpdate

      protected void onProgressUpdate(Progress... values)
      Updates the progress dialog by trying to guess the meaning of the supplied parameter(s): - if values is of numeric type - if values[0] < 0, then progress is indeterminate - if values[0] >= 0, then (int) values[0] is set as progress - if values[1] > 0, then (int) values[1] is set as max, otherwise max defaults to 100 - if values[2] >= 0, then (int) values[2] is set as secondary progress - if values is of CharSequence type, then values[0] is set as info text and progress to indeterminate - if values is a Pair of a Number and a String, the above is applied to either value of the pair
      Overrides:
      onProgressUpdate in class android.os.AsyncTask<Params,Progress,Result>