public class Builder
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
IndicatorSeekBar |
build()
call this to new an IndicatorSeekBar
|
Builder |
clearPadding(boolean clearPadding)
seek bar has a default padding left and right(16 dp) , call this method to set both to zero.
|
Builder |
indicatorColor(int indicatorColor)
set the seek bar's indicator's color. have no influence on custom indicator.
|
Builder |
indicatorContentView(android.view.View indicatorContentView)
set the seek bar's indicator's custom indicator view. only effect on custom indicator type.
|
Builder |
indicatorContentViewLayoutId(int layoutId)
set the seek bar's indicator's custom indicator layout identify. only effect on custom indicator type.
|
Builder |
indicatorTextColor(int indicatorTextColor)
set the color for indicator text . have no influence on custom tickDrawable.
|
Builder |
indicatorTextSize(int indicatorTextSize)
change the size for indicator text.have no influence on custom indicator.
|
Builder |
indicatorTopContentView(android.view.View topContentView)
set the seek bar's indicator's custom top content view.
|
Builder |
indicatorTopContentViewLayoutId(int layoutId)
set the seek bar's indicator's custom top content view layout identify.
|
Builder |
max(float max)
Set the upper limit of this seek bar's range.
|
Builder |
min(float min)
Set the lower limit of this seek bar's range.
|
Builder |
onlyThumbDraggable(boolean onlyThumbDraggable)
user change the thumb's location by touching thumb,touching track will not worked.
|
Builder |
progress(float progress)
Sets the current progress to the specified value.
|
Builder |
progressValueFloat(boolean isFloatProgress)
make the progress in float type. default in int type.
|
Builder |
r2l(boolean r2l)
right to left,compat local problem.
|
Builder |
seekSmoothly(boolean seekSmoothly)
seek continuously or discrete
|
Builder |
showIndicatorType(int showIndicatorType)
call this method to show different shape of indicator.
|
Builder |
showThumbText(boolean showThumbText)
call this method to show the text below thumb or not
|
Builder |
showTickMarksType(int tickMarksType)
call this method to show different tickMark shape.
|
Builder |
showTickTexts(boolean showTickText)
show the tick texts or not
|
Builder |
thumbColor(int thumbColor)
set the seek bar's thumb's color.
|
Builder |
thumbColorStateList(android.content.res.ColorStateList thumbColorStateList)
set the seek bar's thumb's selector color.
|
Builder |
thumbDrawable(android.graphics.drawable.Drawable thumbDrawable)
set a new thumb drawable.
|
Builder |
thumbDrawable(android.graphics.drawable.StateListDrawable thumbStateListDrawable)
call this method to custom the thumb showing drawable by selector Drawable.
|
Builder |
thumbSize(int thumbSize)
set the seek bar's thumb's Width.will be limited in 30dp.
|
Builder |
thumbTextColor(int thumbTextColor)
set the seek bar's thumb's text color.
|
Builder |
tickCount(int tickCount)
set the tickMarks number.
|
Builder |
tickMarksColor(android.content.res.ColorStateList tickMarksColorStateList)
set the seek bar's tick's color.
|
Builder |
tickMarksColor(int tickMarksColor)
set the seek bar's tick's color.
|
Builder |
tickMarksDrawable(android.graphics.drawable.Drawable tickMarksDrawable)
call this method to custom the tick showing drawable.
|
Builder |
tickMarksDrawable(android.graphics.drawable.StateListDrawable tickMarksStateListDrawable)
call this method to custom the tick showing drawable by selector.
|
Builder |
tickMarksEndsHide(boolean tickMarksEndsHide)
call this method to hide the tickMarks which show in the both ends sides of seek bar.
|
Builder |
tickMarksSize(int tickMarksSize)
set the seek bar's tick width , if tick type is divider, call this method will be not worked(tick type is divider,has a regular value 2dp).
|
Builder |
tickMarksSweptHide(boolean tickMarksSweptHide)
call this method to hide the tickMarks on seekBar's thumb left;
|
Builder |
tickTextsArray(int tickTextsArray)
call this method to replace the seek bar's tickMarks' below/above tick texts.
|
Builder |
tickTextsArray(java.lang.String[] tickTextsArray)
call this method to replace the seek bar's tickMarks' below/above tick texts.
|
Builder |
tickTextsColor(int tickTextsColor)
set the color for text below/above seek bar's tickText.
|
Builder |
tickTextsColorStateList(android.content.res.ColorStateList tickTextsColorStateList)
set the selector color for text below/above seek bar's tickText.
|
Builder |
tickTextsSize(int tickTextsSize)
set the size for tickText which below/above seek bar's tick .
|
Builder |
tickTextsTypeFace(android.graphics.Typeface tickTextsTypeFace)
set the tick text's / thumb text textTypeface .
|
Builder |
trackBackgroundColor(int trackBackgroundColor)
set the seek bar's background track's color.
|
Builder |
trackBackgroundSize(int trackBackgroundSize)
set the seek bar's background track's Stroke Width
|
Builder |
trackProgressColor(int trackProgressColor)
set the seek bar's progress track's color.
|
Builder |
trackProgressSize(int trackProgressSize)
set the seek bar's progress track's Stroke Width
|
Builder |
trackRoundedCorners(boolean trackRoundedCorners)
call this method to show the seek bar's ends to square corners.default rounded corners.
|
Builder |
userSeekable(boolean userSeekable)
prevent user from touching to seek or not
|
public IndicatorSeekBar build()
public Builder max(float max)
max - the max rangepublic Builder min(float min)
min - the min rangepublic Builder progress(float progress)
progress - the current level of seek barpublic Builder progressValueFloat(boolean isFloatProgress)
isFloatProgress - true for float progress,default false.public Builder seekSmoothly(boolean seekSmoothly)
seekSmoothly - true for seek continuously ignore having tickMarks.public Builder r2l(boolean r2l)
r2l - true for local which read text from right to leftpublic Builder clearPadding(boolean clearPadding)
clearPadding - true to clear the default padding, false to keep.public Builder userSeekable(boolean userSeekable)
userSeekable - true user can seek.public Builder onlyThumbDraggable(boolean onlyThumbDraggable)
onlyThumbDraggable - true for seeking only by drag thumb. default false;public Builder showIndicatorType(int showIndicatorType)
showIndicatorType - seeIndicatorType
IndicatorType.NONE;
IndicatorType.CIRCULAR_BUBBLE;
IndicatorType.ROUNDED_RECTANGLE;
IndicatorType.RECTANGLE;
IndicatorType.CUSTOM;public Builder indicatorColor(int indicatorColor)
indicatorColor - colorIntpublic Builder indicatorTextColor(int indicatorTextColor)
indicatorTextColor - ColorIntpublic Builder indicatorTextSize(int indicatorTextSize)
indicatorTextSize - The scaled pixel size.public Builder indicatorContentView(android.view.View indicatorContentView)
indicatorContentView - the custom indicator viewpublic Builder indicatorContentViewLayoutId(int layoutId)
layoutId - the custom indicator layout identifypublic Builder indicatorTopContentView(android.view.View topContentView)
topContentView - the custom indicator top content viewpublic Builder indicatorTopContentViewLayoutId(int layoutId)
layoutId - the custom view for indicator top content layout identify.public Builder trackBackgroundSize(int trackBackgroundSize)
trackBackgroundSize - The dp size.public Builder trackBackgroundColor(int trackBackgroundColor)
trackBackgroundColor - colorIntpublic Builder trackProgressSize(int trackProgressSize)
trackProgressSize - The dp size.public Builder trackProgressColor(int trackProgressColor)
trackProgressColor - colorIntpublic Builder trackRoundedCorners(boolean trackRoundedCorners)
trackRoundedCorners - false to show square corners.public Builder thumbTextColor(int thumbTextColor)
thumbTextColor - colorIntpublic Builder showThumbText(boolean showThumbText)
showThumbText - show the text below thumb or notpublic Builder thumbColor(int thumbColor)
thumbColor - colorIntpublic Builder thumbColorStateList(android.content.res.ColorStateList thumbColorStateList)
thumbColorStateList - color selectorpublic Builder thumbSize(int thumbSize)
thumbSize - The dp size.public Builder thumbDrawable(android.graphics.drawable.Drawable thumbDrawable)
thumbDrawable - the drawable for thumb.public Builder thumbDrawable(android.graphics.drawable.StateListDrawable thumbStateListDrawable)
thumbStateListDrawable - the drawable show as Thumb.selector format:
public Builder showTickTexts(boolean showTickText)
showTickText - show the text below track or not.public Builder tickTextsColor(int tickTextsColor)
tickTextsColor - ColorIntpublic Builder tickTextsColorStateList(android.content.res.ColorStateList tickTextsColorStateList)
tickTextsColorStateList - ColorIntpublic Builder tickTextsSize(int tickTextsSize)
tickTextsSize - The scaled pixel size.public Builder tickTextsArray(java.lang.String[] tickTextsArray)
tickTextsArray - the length should same as tickCount.public Builder tickTextsArray(int tickTextsArray)
tickTextsArray - the length should same as tickNum.public Builder tickTextsTypeFace(android.graphics.Typeface tickTextsTypeFace)
tickTextsTypeFace - The text textTypeface.public Builder tickCount(int tickCount)
tickCount - the tickMarks count show on seek bar.
if you want the seek bar's block size is N , this tickCount should be N+1.public Builder showTickMarksType(int tickMarksType)
tickMarksType - seeTickMarkType
TickMarkType.NONE;
TickMarkType.OVAL;
TickMarkType.SQUARE;
TickMarkType.DIVIDER;public Builder tickMarksColor(int tickMarksColor)
tickMarksColor - colorIntpublic Builder tickMarksColor(android.content.res.ColorStateList tickMarksColorStateList)
tickMarksColorStateList - colorIntpublic Builder tickMarksSize(int tickMarksSize)
tickMarksSize - the dp size.public Builder tickMarksDrawable(android.graphics.drawable.Drawable tickMarksDrawable)
tickMarksDrawable - the drawable show as tickMark.public Builder tickMarksDrawable(android.graphics.drawable.StateListDrawable tickMarksStateListDrawable)
tickMarksStateListDrawable - the StateListDrawable show as tickMark.public Builder tickMarksEndsHide(boolean tickMarksEndsHide)
tickMarksEndsHide - true for hide.public Builder tickMarksSweptHide(boolean tickMarksSweptHide)
tickMarksSweptHide - true for hide.