public abstract class BoomButtonBuilder<T>
extends java.lang.Object
| 构造器和说明 |
|---|
BoomButtonBuilder() |
| 限定符和类型 | 方法和说明 |
|---|---|
abstract BoomButton |
build(android.content.Context context) |
BoomButton |
button() |
T |
highlightedColor(int highlightedColor)
The color of boom-button when it is at highlighted-state.
|
T |
highlightedColorRes(int highlightedColorRes)
The resource of color of boom-button when it is at highlighted-state.
|
T |
highlightedImageDrawable(android.graphics.drawable.Drawable highlightedImageDrawable)
Set the image drawable when boom-button is at highlighted-state.
|
T |
highlightedImageRes(int highlightedImageRes)
Set the image resource when boom-button is at highlighted-state.
|
T |
imagePadding(android.graphics.Rect imagePadding)
Set the padding of image.
|
T |
imageRect(android.graphics.Rect imageRect)
Set the rect of image.
|
BoomButtonBuilder |
index(int index)
Set the index of the boom-button, only used in BMB package.
|
BoomButtonBuilder |
innerListener(InnerOnBoomButtonClickListener listener)
Set the listener of the boom-button, only used in BMB package.
|
T |
listener(OnBMClickListener onBMClickListener)
Set listener for when the boom-button is clicked.
|
T |
normalColor(int normalColor)
The color of boom-button when it is at normal-state.
|
T |
normalColorRes(int normalColorRes)
The resource of color of boom-button when it is at normal-state.
|
T |
normalImageDrawable(android.graphics.drawable.Drawable normalImageDrawable)
Set the image drawable when boom-button is at normal-state.
|
T |
normalImageRes(int normalImageRes)
Set the image resource when boom-button is at normal-state.
|
void |
piece(BoomPiece piece)
Set the piece of the builder, only used in BMB package.
|
int |
pieceColor(android.content.Context context)
Get the piece color, only used in BMB package.
|
T |
pieceColor(int pieceColor)
The color of boom-button when it is just a piece.
|
T |
pieceColorRes(int pieceColorRes)
The resource of color of boom-button when it is just a piece.
|
T |
rippleEffect(boolean rippleEffect)
Whether the boom-button should have a ripple effect.
|
T |
rotateImage(boolean rotateImage)
Whether the image-view should rotate.
|
void |
setUnable(boolean unable) |
T |
shadowColor(int shadowColor)
Set the color of the shadow of boom-button.
|
T |
shadowCornerRadius(int shadowCornerRadius)
Set the corner-radius of the shadow.
|
T |
shadowEffect(boolean shadowEffect)
Whether the boom-button should have a shadow effect.
|
T |
shadowOffsetX(int shadowOffsetX)
Set the horizontal shadow-offset of the boom-button.
|
T |
shadowOffsetY(int shadowOffsetY)
Set the vertical shadow-offset of the boom-button.
|
T |
shadowRadius(int shadowRadius)
Set the radius of shadow of the boom-button.
|
T |
unable(boolean unable)
Whether the boom-button is unable, default value is false.
|
T |
unableColor(int unableColor)
The color of boom-button when it is at unable-state.
|
T |
unableColorRes(int unableColorRes)
The resource of color of boom-button when it is at unable-state.
|
T |
unableImageDrawable(android.graphics.drawable.Drawable unableImageDrawable)
Set the image drawable when boom-button is at unable-state.
|
T |
unableImageRes(int unableImageRes)
Set the image resource when boom-button is at unable-state.
|
public abstract BoomButton build(android.content.Context context)
public int pieceColor(android.content.Context context)
context - contextpublic void setUnable(boolean unable)
public BoomButton button()
public void piece(BoomPiece piece)
piece - the piecepublic BoomButtonBuilder index(int index)
index - the indexpublic BoomButtonBuilder innerListener(InnerOnBoomButtonClickListener listener)
listener - the listenerpublic T listener(OnBMClickListener onBMClickListener)
onBMClickListener - OnBMClickListenerpublic T rotateImage(boolean rotateImage)
rotateImage - rotate or notpublic T shadowEffect(boolean shadowEffect)
shadowEffect - have shadow effect or notpublic T shadowOffsetX(int shadowOffsetX)
shadowOffsetX - the shadow offset xpublic T shadowOffsetY(int shadowOffsetY)
shadowOffsetY - the shadow offset ypublic T shadowRadius(int shadowRadius)
shadowRadius - the shadow radiuspublic T shadowCornerRadius(int shadowCornerRadius)
shadowCornerRadius - corner-radius of the shadowpublic T shadowColor(int shadowColor)
shadowColor - the shadow colorpublic T normalImageDrawable(android.graphics.drawable.Drawable normalImageDrawable)
normalImageDrawable - the normal image drawablepublic T normalImageRes(int normalImageRes)
normalImageRes - the normal image respublic T highlightedImageDrawable(android.graphics.drawable.Drawable highlightedImageDrawable)
highlightedImageDrawable - the highlighted image drawablepublic T highlightedImageRes(int highlightedImageRes)
highlightedImageRes - the highlighted image respublic T unableImageDrawable(android.graphics.drawable.Drawable unableImageDrawable)
unableImageDrawable - the unable image drawablepublic T unableImageRes(int unableImageRes)
unableImageRes - the unable image respublic T imageRect(android.graphics.Rect imageRect)
imageRect - the image rect, in pixel.public T imagePadding(android.graphics.Rect imagePadding)
imagePadding - the image paddingpublic T rippleEffect(boolean rippleEffect)
rippleEffect - the ripple effectpublic T normalColor(int normalColor)
normalColor - the normal colorpublic T normalColorRes(int normalColorRes)
normalColorRes - resource of normal colorpublic T highlightedColor(int highlightedColor)
highlightedColor - the highlighted colorpublic T highlightedColorRes(int highlightedColorRes)
highlightedColorRes - resource of highlighted colorpublic T unableColor(int unableColor)
unableColor - the unable colorpublic T unableColorRes(int unableColorRes)
unableColorRes - resource of unable colorpublic T pieceColor(int pieceColor)
pieceColor - color of piecepublic T pieceColorRes(int pieceColorRes)
pieceColorRes - resource of color of piecepublic T unable(boolean unable)
unable - the unable