public abstract class AbstractItem extends java.lang.Object implements DataSourceInterface
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FLAVOR_OPTION_LIST |
static java.lang.String |
FLAVOR_OPTION_LIST_FOLDER_SUBITEM |
static java.lang.String |
FLAVOR_QUICK_OPTION_LIST |
static java.lang.String |
FLAVOR_QUICK_OPTION_LIST_FOLDER_SUBITEM |
protected boolean |
isDirty |
protected static int |
ORIGINAL_THUMBNAIL_SIZE |
Modifier | Constructor and Description |
---|---|
protected |
AbstractItem() |
protected |
AbstractItem(int name) |
protected |
AbstractItem(int name,
ImageSource thumbnailSource) |
protected |
AbstractItem(android.os.Parcel in) |
protected |
AbstractItem(java.lang.String name) |
protected |
AbstractItem(java.lang.String name,
ImageSource thumbnailSource) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
abstract boolean |
equals(java.lang.Object o) |
abstract int |
getLayout()
Get the default layout res id of the list item view.
|
int |
getLayout(java.lang.String flavor)
Get the flavored layout res id of the list item view.
|
java.lang.String |
getName()
Get the Name
|
android.graphics.Bitmap |
getThumbnailBitmap()
Return Thumbnail in full size.
|
android.graphics.Bitmap |
getThumbnailBitmap(int maxWidth)
Return the Thumbnail, do not call in Main Thread and use #getThumbnailResId() if #hasStaticThumbnail
|
int |
getThumbnailResId()
Get the static thumbnail drawable resource id if exist.
|
ImageSource |
getThumbnailSource() |
java.lang.Class<? extends DataSourceListAdapter.DataSourceViewHolder> |
getViewHolderClass()
Get the class of a ViewHolder to Display in List
|
boolean |
hasStaticThumbnail()
Check if it has a static thumbnail drawable.
|
boolean |
isClickable() |
boolean |
isDirty() |
void |
setDirtyFlag(boolean isDirty) |
void |
setName(java.lang.String name) |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSelectable
protected static final int ORIGINAL_THUMBNAIL_SIZE
public static final java.lang.String FLAVOR_OPTION_LIST
public static final java.lang.String FLAVOR_OPTION_LIST_FOLDER_SUBITEM
public static final java.lang.String FLAVOR_QUICK_OPTION_LIST
public static final java.lang.String FLAVOR_QUICK_OPTION_LIST_FOLDER_SUBITEM
protected boolean isDirty
protected AbstractItem()
protected AbstractItem(@Nullable java.lang.String name)
protected AbstractItem(@Nullable java.lang.String name, @Nullable ImageSource thumbnailSource)
protected AbstractItem(@StringRes int name)
protected AbstractItem(@StringRes int name, @Nullable ImageSource thumbnailSource)
protected AbstractItem(android.os.Parcel in)
public void setName(@Nullable java.lang.String name)
public boolean isDirty()
isDirty
in interface DataSourceInterface
public void setDirtyFlag(boolean isDirty)
setDirtyFlag
in interface DataSourceInterface
public java.lang.String getName()
getName
in interface DataSourceInterface
public abstract int getLayout()
DataSourceInterface
getLayout
in interface DataSourceInterface
public int getLayout(java.lang.String flavor)
DataSourceInterface
getLayout
in interface DataSourceInterface
public boolean isClickable()
@Nullable public ImageSource getThumbnailSource()
@NonNull public java.lang.Class<? extends DataSourceListAdapter.DataSourceViewHolder> getViewHolderClass()
DataSourceInterface
getViewHolderClass
in interface DataSourceInterface
@DrawableRes public int getThumbnailResId()
hasStaticThumbnail()
public boolean hasStaticThumbnail()
getThumbnailBitmap()
@Nullable public android.graphics.Bitmap getThumbnailBitmap()
getThumbnailBitmap(int maxWidth)
@Nullable @WorkerThread public android.graphics.Bitmap getThumbnailBitmap(int maxWidth)
maxWidth
- Size the drawable should be limited to.public abstract boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable