Class Preview<T,D>
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
An abstract class to provide the data preview functionality.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPreview()
Constructor to initialize an object of this class..Constructor to initialize an object of this class.Constructor to initialize an object of this class.Constructor to initialize an object of this class. -
Method Summary
Modifier and TypeMethodDescriptiongetData()
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.getInfo()
Get the info used by this preview.Get the subtitle used by this preview.getTitle()
Get the title used by this preview.void
Set the data used by this preview.void
setDataCustom
(D dataCustom) Set the customized data used by this preview.void
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.
-
Field Details
-
KEY
Preview key to maintain its state.- See Also:
-
-
Constructor Details
-
Preview
public Preview()Constructor to initialize an object of this class.. -
Preview
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
Get the info used by this preview.- Returns:
- The info used by this preview.
-
setInfo
Set the info used by this preview.- Parameters:
info
- The info to be set.
-
getData
Get the data used by this preview.- Parameters:
resolve
-true
to resolve the custom data.- Returns:
- The data used by this preview.
-
getData
Get the data used by this preview.- Returns:
- The data used by this preview.
- See Also:
-
setData
Set the data used by this preview.- Parameters:
data
- The data to be set.
-
getDataCustom
Get the customized data used by this preview.- Returns:
- The customized data used by this preview.
-
setDataCustom
Set the customized data used by this preview.- Parameters:
dataCustom
- The customized data to be set.
-
getTitle
Get the title used by this preview.- Returns:
- The title used by this preview.
-
setTitle
Set the title used by this preview.- Parameters:
title
- The title used to be set.
-
getSubtitle
Get the subtitle used by this preview.- Returns:
- The subtitle used by this preview.
-
setSubtitle
Set the subtitle used by this preview.- Parameters:
subtitle
- The subtitle used to be set.
-