public abstract class BaseSliderView extends Buttons
| Modifier and Type | Class and Description |
|---|---|
static interface |
BaseSliderView.ImageLoadListener |
static interface |
BaseSliderView.OnSliderClickListener |
static class |
BaseSliderView.ScaleType |
| Modifier and Type | Field and Description |
|---|---|
protected android.content.Context |
mContext |
protected BaseSliderView.OnSliderClickListener |
mOnSliderClickListener |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseSliderView(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
BaseSliderView |
align(java.lang.String align)
the layout elements alignment a slider image.
|
protected void |
bindEventAndShow(android.view.View v,
android.widget.ImageView targetImageView)
When you want to implement your own slider view, please call this method in the end in
`getView()` method
|
BaseSliderView |
blockAlign(java.lang.String align)
the layout elements alignment a slider image.
|
BaseSliderView |
bundle(android.os.Bundle bundle)
lets users add a bundle of additional information
|
BaseSliderView |
button(java.lang.String button,
int index)
the button of a slider image.
|
BaseSliderView |
buttonColor(java.lang.String buttonColor,
int index)
the button color of a slider image.
|
BaseSliderView |
buttonDeepLink(java.lang.String buttonDeepLink,
int index)
the button color of a slider image.
|
BaseSliderView |
buttonSize(int buttonSize,
int index)
the button size of a slider image.
|
BaseSliderView |
buttonTextColor(java.lang.String buttonTextColor,
int index)
the button text color of a slider image.
|
BaseSliderView |
deeplink(java.lang.String deeplink)
the deeplink of a slider image.
|
BaseSliderView |
description(java.lang.String description)
the description of a slider image.
|
BaseSliderView |
descriptionColor(java.lang.String descriptionColor)
the description color of a slider image.
|
BaseSliderView |
descriptionSize(int descriptionSize)
the description size of a slider image.
|
BaseSliderView |
empty(int resId)
the placeholder image when loading image from url or file.
|
BaseSliderView |
error(int resId)
if you set errorDisappear false, this will set a error placeholder image.
|
BaseSliderView |
errorDisappear(boolean disappear)
determine whether remove the image which failed to download or load from file
|
int |
getAlignment() |
int[] |
getBlockAlignment() |
android.os.Bundle |
getBundle()
when you have some extra information, please put it in this bundle.
|
protected java.lang.String |
getButton(int index) |
protected java.lang.String |
getButtonColor(int index) |
protected java.lang.String |
getButtonDeepLink(int index) |
protected int |
getButtonSize(int index) |
protected java.lang.String |
getButtonTextColor(int index) |
android.content.Context |
getContext() |
protected java.lang.String |
getDeepLink() |
protected java.lang.String |
getDescription() |
protected java.lang.String |
getDescriptionColor() |
protected int |
getDescriptionSize() |
protected int |
getDpFromPixels(int pixels) |
protected int |
getEmpty() |
protected int |
getError() |
android.os.Bundle |
getmExtras() |
int |
getNumberOfButtons() |
com.squareup.picasso.Picasso |
getPicasso()
Get the last instance set via setPicasso(), or null if no user provided instance was set
|
BaseSliderView.ScaleType |
getScaleType() |
protected int |
getTitleSize() |
protected java.lang.String |
getTitleText() |
protected java.lang.String |
getTitleTextColor() |
protected java.lang.String |
getUrl() |
abstract android.view.View |
getView()
the extended class have to implement getView(), which is called by the adapter, every extended
class response to render their own view.
|
BaseSliderView |
image(java.io.File file)
set a file as a image that will to load
|
BaseSliderView |
image(int res) |
BaseSliderView |
image(java.lang.String url)
set a url as a image that preparing to load
|
boolean |
isErrorDisappear() |
BaseSliderView |
numberOfButtons(int numberOfButtons)
the number of buttons of a slider image.
|
BaseSliderView |
onClick(java.lang.String mDeepLink)
set a slider image click listener
|
void |
setmExtras(android.os.Bundle mExtras) |
void |
setOnImageLoadListener(BaseSliderView.ImageLoadListener l)
set a listener to get a message , if load error.
|
BaseSliderView |
setOnSliderClickListener(BaseSliderView.OnSliderClickListener l)
set a slider image click listener
|
void |
setPicasso(com.squareup.picasso.Picasso picasso)
Provide a Picasso instance to use when loading pictures, this is useful if you have a
particular HTTP cache you would like to share.
|
BaseSliderView |
setScaleType(BaseSliderView.ScaleType type) |
BaseSliderView |
title(java.lang.String title)
the title of a slider image.
|
BaseSliderView |
titleColor(java.lang.String titleColor)
the title color of a slider image.
|
BaseSliderView |
titleSize(int titleSize)
the title of a slider image.
|
getmButton, getmButtonColor, getmButtonDeepLink, getmButtonLandingPage, getmButtonSize, getmButtonTextColor, setmButton, setmButtonColor, setmButtonDeepLink, setmButtonLandingPage, setmButtonSize, setmButtonTextColorprotected android.content.Context mContext
protected BaseSliderView.OnSliderClickListener mOnSliderClickListener
public BaseSliderView empty(int resId)
resId - Image resource idpublic BaseSliderView errorDisappear(boolean disappear)
public BaseSliderView error(int resId)
resId - image resource idpublic BaseSliderView title(java.lang.String title)
public BaseSliderView description(java.lang.String description)
public BaseSliderView deeplink(java.lang.String deeplink)
public BaseSliderView numberOfButtons(int numberOfButtons)
public BaseSliderView button(java.lang.String button, int index)
public BaseSliderView titleSize(int titleSize)
public BaseSliderView descriptionSize(int descriptionSize)
public BaseSliderView buttonSize(int buttonSize, int index)
public BaseSliderView titleColor(java.lang.String titleColor)
public BaseSliderView descriptionColor(java.lang.String descriptionColor)
public BaseSliderView buttonTextColor(java.lang.String buttonTextColor, int index)
public BaseSliderView buttonColor(java.lang.String buttonColor, int index)
public BaseSliderView buttonDeepLink(java.lang.String buttonDeepLink, int index)
public BaseSliderView align(java.lang.String align)
public BaseSliderView blockAlign(java.lang.String align)
public BaseSliderView image(java.lang.String url)
public BaseSliderView image(java.io.File file)
public BaseSliderView image(int res)
public BaseSliderView bundle(android.os.Bundle bundle)
protected java.lang.String getUrl()
public boolean isErrorDisappear()
protected int getEmpty()
protected int getError()
protected java.lang.String getDescription()
protected java.lang.String getTitleText()
protected java.lang.String getDeepLink()
protected java.lang.String getButton(int index)
protected int getTitleSize()
protected int getDescriptionSize()
protected int getButtonSize(int index)
protected java.lang.String getTitleTextColor()
protected java.lang.String getDescriptionColor()
protected java.lang.String getButtonTextColor(int index)
protected java.lang.String getButtonColor(int index)
protected java.lang.String getButtonDeepLink(int index)
public int getAlignment()
public int[] getBlockAlignment()
public int getNumberOfButtons()
public android.content.Context getContext()
public BaseSliderView setOnSliderClickListener(BaseSliderView.OnSliderClickListener l)
public BaseSliderView onClick(java.lang.String mDeepLink)
protected void bindEventAndShow(android.view.View v,
android.widget.ImageView targetImageView)
v - the whole viewtargetImageView - where to place imagepublic BaseSliderView setScaleType(BaseSliderView.ScaleType type)
public BaseSliderView.ScaleType getScaleType()
public abstract android.view.View getView()
protected int getDpFromPixels(int pixels)
public void setOnImageLoadListener(BaseSliderView.ImageLoadListener l)
public android.os.Bundle getBundle()
public com.squareup.picasso.Picasso getPicasso()
public void setPicasso(com.squareup.picasso.Picasso picasso)
picasso - The Picasso instance to use, may be null to let the system use the default
instancepublic android.os.Bundle getmExtras()
public void setmExtras(android.os.Bundle mExtras)