mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-03-11 21:02:37 +00:00
generate docs for a lot of API (test try)
This commit is contained in:
@@ -2,6 +2,16 @@ package dev.inmo.micro_utils.android.pickers
|
||||
|
||||
import androidx.compose.animation.core.*
|
||||
|
||||
/**
|
||||
* Performs a fling animation with an optional target adjustment.
|
||||
* If [adjustTarget] is provided, animates to the adjusted target. Otherwise, performs a decay animation.
|
||||
*
|
||||
* @param initialVelocity The initial velocity of the fling
|
||||
* @param animationSpec The decay animation specification
|
||||
* @param adjustTarget Optional function to adjust the target value based on the calculated target
|
||||
* @param block Optional block to be executed during the animation
|
||||
* @return The result of the animation
|
||||
*/
|
||||
internal suspend fun Animatable<Float, AnimationVector1D>.fling(
|
||||
initialVelocity: Float,
|
||||
animationSpec: DecayAnimationSpec<Float>,
|
||||
|
||||
@@ -41,6 +41,18 @@ private inline fun PointerInputScope.checkContains(offset: Offset): Boolean {
|
||||
|
||||
// src: https://gist.github.com/vganin/a9a84653a9f48a2d669910fbd48e32d5
|
||||
|
||||
/**
|
||||
* A Compose number picker component that allows users to select a number by dragging, using arrow buttons,
|
||||
* or manually entering a value.
|
||||
*
|
||||
* @param number The currently selected number
|
||||
* @param modifier The modifier to be applied to the picker
|
||||
* @param range Optional range of valid numbers. If specified, the picker will be limited to this range
|
||||
* @param textStyle The text style for displaying numbers
|
||||
* @param arrowsColor The color of the up/down arrow buttons
|
||||
* @param allowUseManualInput Whether to allow manual keyboard input for the number
|
||||
* @param onStateChanged Callback invoked when the selected number changes
|
||||
*/
|
||||
@OptIn(ExperimentalTextApi::class, ExperimentalComposeUiApi::class)
|
||||
@Composable
|
||||
fun NumberPicker(
|
||||
|
||||
@@ -22,6 +22,18 @@ import androidx.compose.ui.unit.dp
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.math.*
|
||||
|
||||
/**
|
||||
* A Compose picker component that allows users to select an item from a list by dragging or using arrow buttons.
|
||||
*
|
||||
* @param T The type of items in the list
|
||||
* @param current The currently selected item
|
||||
* @param dataList The list of items to choose from
|
||||
* @param modifier The modifier to be applied to the picker
|
||||
* @param textStyle The text style for displaying items
|
||||
* @param arrowsColor The color of the up/down arrow buttons
|
||||
* @param dataToString A composable function to convert items to strings for display. Defaults to [Any.toString]
|
||||
* @param onStateChanged Callback invoked when the selected item changes
|
||||
*/
|
||||
@OptIn(ExperimentalTextApi::class, ExperimentalComposeUiApi::class)
|
||||
@Composable
|
||||
fun <T> SetPicker(
|
||||
|
||||
Reference in New Issue
Block a user