java.lang.Object
com.pranavpandey.android.dynamic.support.preview.Preview<T,D>
Type Parameters:
T - The type of the info.
D - The type of the data.
Direct Known Subclasses:
ImagePreview

public abstract class Preview<T,D> extends Object
An abstract class to provide the data preview functionality.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Preview key to maintain its state.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor to initialize an object of this class..
    Preview(T info, D data)
    Constructor to initialize an object of this class.
    Preview(T info, D data, D dataCustom, String title, String subtitle)
    Constructor to initialize an object of this class.
    Preview(T info, D data, String title, String subtitle)
    Constructor to initialize an object of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the data used by this preview.
    getData(boolean resolve)
    Get the data used by this preview.
    Get the customized data used by this preview.
    Get the info used by this preview.
    Get the subtitle used by this preview.
    Get the title used by this preview.
    void
    setData(D data)
    Set the data used by this preview.
    void
    setDataCustom(D dataCustom)
    Set the customized data used by this preview.
    void
    setInfo(T info)
    Set the info used by this preview.
    void
    setSubtitle(String subtitle)
    Set the subtitle used by this preview.
    void
    Set the title used by this preview.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • Preview

      public Preview()
      Constructor to initialize an object of this class..
    • Preview

      public Preview(@Nullable T info, @Nullable D data)
      Constructor to initialize an object of this class.
      Parameters:
      info - The info for this preview.
      data - The data for this preview.
    • Preview

      public Preview(@Nullable T info, @Nullable D data, @Nullable String title, @Nullable String subtitle)
      Constructor to initialize an object of this class.
      Parameters:
      info - The info for this preview.
      data - The data for this preview.
      title - The title for this preview.
      subtitle - The subtitle for this preview.
    • Preview

      public Preview(@Nullable T info, @Nullable D data, @Nullable D dataCustom, @Nullable String title, @Nullable String subtitle)
      Constructor to initialize an object of this class.
      Parameters:
      info - The info for this preview.
      data - The data for this preview.
      dataCustom - The customized data for this preview.
      title - The title for this preview.
      subtitle - The subtitle for this preview.
  • Method Details

    • getInfo

      @Nullable public T getInfo()
      Get the info used by this preview.
      Returns:
      The info used by this preview.
    • setInfo

      public void setInfo(@Nullable T info)
      Set the info used by this preview.
      Parameters:
      info - The info to be set.
    • getData

      @Nullable public D getData(boolean resolve)
      Get the data used by this preview.
      Parameters:
      resolve - true to resolve the custom data.
      Returns:
      The data used by this preview.
    • getData

      @Nullable public D getData()
      Get the data used by this preview.
      Returns:
      The data used by this preview.
      See Also:
    • setData

      public void setData(@Nullable D data)
      Set the data used by this preview.
      Parameters:
      data - The data to be set.
    • getDataCustom

      @Nullable public D getDataCustom()
      Get the customized data used by this preview.
      Returns:
      The customized data used by this preview.
    • setDataCustom

      public void setDataCustom(@Nullable D dataCustom)
      Set the customized data used by this preview.
      Parameters:
      dataCustom - The customized data to be set.
    • getTitle

      @Nullable public String getTitle()
      Get the title used by this preview.
      Returns:
      The title used by this preview.
    • setTitle

      public void setTitle(@Nullable String title)
      Set the title used by this preview.
      Parameters:
      title - The title used to be set.
    • getSubtitle

      @Nullable public String getSubtitle()
      Get the subtitle used by this preview.
      Returns:
      The subtitle used by this preview.
    • setSubtitle

      public void setSubtitle(@Nullable String subtitle)
      Set the subtitle used by this preview.
      Parameters:
      subtitle - The subtitle used to be set.