Class PreviewTask


  • public class PreviewTask
    extends android.os.AsyncTask<java.lang.String,​java.lang.Void,​com.cheetahdigital.uikit.widget.LinkPreviewView.LinkPreview>
    Handles loading of Link Preview
    • Nested Class Summary

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

        android.os.AsyncTask.Status
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected PreviewListener mListener  
      protected Post mPost  
      • Fields inherited from class android.os.AsyncTask

        SERIAL_EXECUTOR, THREAD_POOL_EXECUTOR
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected com.cheetahdigital.uikit.widget.LinkPreviewView.LinkPreview doInBackground​(java.lang.String... params)  
      protected void onPostExecute​(com.cheetahdigital.uikit.widget.LinkPreviewView.LinkPreview linkPreview)  
      • Methods inherited from class android.os.AsyncTask

        cancel, execute, execute, executeOnExecutor, get, get, getStatus, isCancelled, onCancelled, onCancelled, onPreExecute, onProgressUpdate, publishProgress
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PreviewTask

        public PreviewTask​(Post post,
                           PreviewListener listener)
        Constructor for this task
        Parameters:
        post - Post that contains link preview
        listener - the PreviewListener for handling loaded link preview
    • Method Detail

      • doInBackground

        protected com.cheetahdigital.uikit.widget.LinkPreviewView.LinkPreview doInBackground​(java.lang.String... params)
        Specified by:
        doInBackground in class android.os.AsyncTask<java.lang.String,​java.lang.Void,​com.cheetahdigital.uikit.widget.LinkPreviewView.LinkPreview>
      • onPostExecute

        protected void onPostExecute​(com.cheetahdigital.uikit.widget.LinkPreviewView.LinkPreview linkPreview)
        Overrides:
        onPostExecute in class android.os.AsyncTask<java.lang.String,​java.lang.Void,​com.cheetahdigital.uikit.widget.LinkPreviewView.LinkPreview>