Skip to content

Latest commit

 

History

History
130 lines (121 loc) · 2.86 KB

ATTRIBUTES.md

File metadata and controls

130 lines (121 loc) · 2.86 KB

中文API

UltraRecyclerView

setOrientation

void setOrientation(int orientation)

Sets the scroll orientation.

setPagerSnap

void setPagerSnap(int gravity)

Enables or disables pager snap and sets align gravity (Gravity.START, Gravity.CENTER and Gravity.END).

void setPagerSnap(int gravity, @Px int alignMargin)

Enables or disables pager snap, and sets align gravity (Gravity.START, Gravity.CENTER and Gravity.END) and margin.

boolean isPagerSnap()

Returns whether this view enables pager snap.

setOnSnapListener

void setOnSnapListener(GravityPagerSnapHelper.OnSnapListener onSnapListener)

Register a callback to be invoked when this view enables pager snap and changes position.

setInfiniteLoop

void setInfiniteLoop(boolean infiniteLoop)

Enables or disables the items infinite loop.

boolean isInfiniteLoop()

Returns whether the items are infinite loop.

AutoScroll

void startAutoScroll()

Starts auto scrolling, and the duration time is 5s.

void startAutoScroll(int duration)

Starts auto scrolling, and the duration is specified.

void startAutoScrollDelayed(int delay)

Starts auto scrolling, the start delay-time is specified, and the duration is 5s.

void startAutoScrollDelayed(int delay, int duration)

Starts auto scrolling, the duration and start delay-time are specified.

void restartAutoScroll()

Restarts auto scrolling.

void stopAutoScroll()

Stops auto scrolling.

void setAutoScrollSpeed(int duration)

Sets auto scrolling speed.

void setAutoScrollSpeed(int duration, Interpolator interpolator)

Sets auto scrolling speed and interpolator.

boolean isAutoScroll()

Returns whether this view is auto scrolled.

getCurrentPosition

int getCurrentPosition()

Returns current position.

getRealCount

int getRealCount()

Returns real count.

refresh

void refresh()

Refresh adapter.

BannerView

BannerView includes all above attributes, and also includes:

setIndicator

void setIndicatorVisibility(int visibility)

Sets visibility of the indicator.

void setIndicatorBottomMargin(@Px int margin)

Sets bottom margin of the indicator.

void setIndicatorSelectedWidth(@Px int selectedWidth)

Sets selected width of the indicator.

void setIndicatorDefaultWidth(@Px int defaultWidth)

Sets default width of the indicator.

void setIndicatorHeight(@Px int height)

Sets height of the indicator.

void setIndicatorMargin(@Px int margin)

Sets inner margin of the indicator.

void setIndicatorSelectedColor(@ColorInt int selectedColor)

Sets selected color of the indicator.

void setIndicatorDefaultColor(@ColorInt int defaultColor)

Sets default color of the indicator.