Package-level declarations

Types

Link copied to clipboard
data class DefaultSlideToUnlockColors(val startTrackColor: Color = Color(0xFF111111), val endTrackColor: Color = Color(0x9F9C9399), val trackBrush: Brush? = null, val startHintColor: Color = Color.White, val endHintColor: Color = Color.White.copy(alpha = 0f), val slidedHintColor: Color = Color.Black, val thumbColor: Color = Color.White, val thumbIconColor: Color = Color.Black, val thumbBrush: Brush? = null, val progressColor: Color = Color(0xFF11D483)) : SlideToUnlockColors

The default, concrete implementation of the SlideToUnlockColors interface.

Link copied to clipboard
data class HintTexts(val defaultText: String, val slidedText: String)

A data class that holds the text content for the hint displayed in the SlideToUnlock component.

Link copied to clipboard

Represents the orientation of the sliding gesture for the component.

Link copied to clipboard

Defines the customizable colors used by a SlideToUnlock component.

Link copied to clipboard

Contains default values and functions used by the SlideToUnlock component.

Functions

Link copied to clipboard
fun SlideToUnlock(isSlided: Boolean, onSlideCompleted: () -> Unit = {}, modifier: Modifier = Modifier, colors: SlideToUnlockColors = DefaultSlideToUnlockColors(), hintTexts: HintTexts = HintTexts.defaultHintTexts(), trackShape: Shape = RoundedCornerShape(percent = 50), thumbSize: DpSize = DpSize(ThumbSize, ThumbSize), fractionalThreshold: Float = 0.85f, paddings: PaddingValues = PaddingValues(SlideToUnlockDefaults.Paddings), hintPaddings: PaddingValues = PaddingValues(start = thumbSize.width, end = thumbSize.width), onSlideFractionChanged: (Float) -> Unit = {}, orientation: SlideOrientation = SlideOrientation.Horizontal, thumb: @Composable BoxScope.(isSlided: Boolean, slideFraction: Float, colors: SlideToUnlockColors, size: DpSize, orientation: SlideOrientation) -> Unit = { slided, _, _, size, orient -> SlideToUnlockDefaults.Thumb( modifier = Modifier.size(thumbSize), isSlided = slided, colors = colors, thumbSize = thumbSize, orientation = orient, ) }, hint: @Composable BoxScope.(isSlided: Boolean, slideFraction: Float, hintTexts: HintTexts, colors: SlideToUnlockColors, paddings: PaddingValues, orientation: SlideOrientation) -> Unit = { slided, fraction, _, _, paddings, orient -> SlideToUnlockDefaults.Hint( modifier = Modifier.align(Alignment.Center), slideFraction = fraction, hintTexts = hintTexts, isSlided = slided, colors = colors, paddingValues = hintPaddings, orientation = orient, ) })

A fully customizable "slide-to-unlock" UI component for Jetpack Compose.