Package-level declarations

Types

Link copied to clipboard

嵌套滑动模式:在进行下拉刷新或上拉加载时,Header和Footer都可以设置相应的NestedScrollMode, 不同的模式会决定Header和Footer与内容进行的联动效果有所不同。

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class UltraSwipeRefreshState(isRefreshing: Boolean, isLoading: Boolean)

状态:主要用于控制和观察UltraSwipeRefresh;比如:控制上拉刷新和下拉加载和观察其状态。

Functions

Link copied to clipboard
fun UltraSwipeRefresh(state: UltraSwipeRefreshState, onRefresh: () -> Unit, onLoadMore: () -> Unit, modifier: Modifier = Modifier, headerScrollMode: NestedScrollMode = UltraSwipeRefreshTheme.config.headerScrollMode, footerScrollMode: NestedScrollMode = UltraSwipeRefreshTheme.config.footerScrollMode, refreshEnabled: Boolean = UltraSwipeRefreshTheme.config.refreshEnabled, loadMoreEnabled: Boolean = UltraSwipeRefreshTheme.config.loadMoreEnabled, @FloatRange(from = 0.0, fromInclusive = false) refreshTriggerRate: Float = UltraSwipeRefreshTheme.config.refreshTriggerRate, @FloatRange(from = 0.0, fromInclusive = false) loadMoreTriggerRate: Float = UltraSwipeRefreshTheme.config.loadMoreTriggerRate, @FloatRange(from = 1.0) headerMaxOffsetRate: Float = UltraSwipeRefreshTheme.config.headerMaxOffsetRate, @FloatRange(from = 1.0) footerMaxOffsetRate: Float = UltraSwipeRefreshTheme.config.footerMaxOffsetRate, @FloatRange(from = 0.0, to = 1.0, fromInclusive = false) dragMultiplier: Float = UltraSwipeRefreshTheme.config.dragMultiplier, @IntRange(from = 0, to = 2000) finishDelayMillis: Long = UltraSwipeRefreshTheme.config.finishDelayMillis, vibrateEnabled: Boolean = UltraSwipeRefreshTheme.config.vibrateEnabled, alwaysScrollable: Boolean = UltraSwipeRefreshTheme.config.alwaysScrollable, headerIndicator: @Composable (UltraSwipeRefreshState) -> Unit = UltraSwipeRefreshTheme.config.headerIndicator, footerIndicator: @Composable (UltraSwipeRefreshState) -> Unit = UltraSwipeRefreshTheme.config.footerIndicator, contentContainer: @Composable (@Composable () -> Unit) -> Unit = UltraSwipeRefreshTheme.config.contentContainer, content: @Composable () -> Unit)
fun UltraSwipeRefresh(isRefreshing: Boolean, isLoading: Boolean, onRefresh: () -> Unit, onLoadMore: () -> Unit, modifier: Modifier = Modifier, headerScrollMode: NestedScrollMode = UltraSwipeRefreshTheme.config.headerScrollMode, footerScrollMode: NestedScrollMode = UltraSwipeRefreshTheme.config.footerScrollMode, refreshEnabled: Boolean = UltraSwipeRefreshTheme.config.refreshEnabled, loadMoreEnabled: Boolean = UltraSwipeRefreshTheme.config.loadMoreEnabled, @FloatRange(from = 0.0, fromInclusive = false) refreshTriggerRate: Float = UltraSwipeRefreshTheme.config.refreshTriggerRate, @FloatRange(from = 0.0, fromInclusive = false) loadMoreTriggerRate: Float = UltraSwipeRefreshTheme.config.loadMoreTriggerRate, @FloatRange(from = 1.0) headerMaxOffsetRate: Float = UltraSwipeRefreshTheme.config.headerMaxOffsetRate, @FloatRange(from = 1.0) footerMaxOffsetRate: Float = UltraSwipeRefreshTheme.config.footerMaxOffsetRate, @FloatRange(from = 0.0, to = 1.0, fromInclusive = false) dragMultiplier: Float = UltraSwipeRefreshTheme.config.dragMultiplier, @IntRange(from = 0, to = 2000) finishDelayMillis: Long = UltraSwipeRefreshTheme.config.finishDelayMillis, vibrateEnabled: Boolean = UltraSwipeRefreshTheme.config.vibrateEnabled, alwaysScrollable: Boolean = UltraSwipeRefreshTheme.config.alwaysScrollable, headerIndicator: @Composable (UltraSwipeRefreshState) -> Unit = UltraSwipeRefreshTheme.config.headerIndicator, footerIndicator: @Composable (UltraSwipeRefreshState) -> Unit = UltraSwipeRefreshTheme.config.footerIndicator, contentContainer: @Composable (@Composable () -> Unit) -> Unit = UltraSwipeRefreshTheme.config.contentContainer, content: @Composable () -> Unit)

UltraSwipeRefresh:一个可带来极致体验的Compose刷新组件;支持下拉刷新和上拉加载,可完美替代官方的SwipeRefresh;并且支持的功能更多,可扩展性更强。