Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
commandiron committed Sep 8, 2022
1 parent f28c84d commit 66f07be
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ fun WheelDatePicker(
size: DpSize = DpSize(256.dp, 128.dp),
textStyle: TextStyle = MaterialTheme.typography.titleMedium,
textColor: Color = LocalContentColor.current,
infiniteLoopEnabled: Boolean = false,
selectorEnabled: Boolean = true,
selectorShape: Shape = RoundedCornerShape(16.dp),
selectorColor: Color = MaterialTheme.colorScheme.primary.copy(alpha = 0.2f),
Expand Down Expand Up @@ -71,6 +72,7 @@ fun WheelDatePicker(
texts = dayTexts.value,
textStyle = textStyle,
textColor = textColor,
infiniteLoopEnabled = infiniteLoopEnabled,
selectorEnabled = false,
selectedIndex = localDateNow.dayOfMonth - 1,
onScrollFinished = { selectedIndex ->
Expand All @@ -94,6 +96,7 @@ fun WheelDatePicker(
texts = monthTexts,
textStyle = textStyle,
textColor = textColor,
infiniteLoopEnabled = infiniteLoopEnabled,
selectorEnabled = false,
selectedIndex = localDateNow.month.value - 1,
onScrollFinished = { selectedIndex ->
Expand All @@ -118,6 +121,7 @@ fun WheelDatePicker(
texts = yearTexts,
textStyle = textStyle,
textColor = textColor,
infiniteLoopEnabled = infiniteLoopEnabled,
selectorEnabled = false,
selectedIndex = yearRange,
onScrollFinished = { selectedIndex ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ fun WheelDateTimePicker(
size: DpSize = DpSize(256.dp, 128.dp),
textStyle: TextStyle = MaterialTheme.typography.titleMedium,
textColor: Color = LocalContentColor.current,
infiniteLoopEnabled: Boolean = false,
selectorEnabled: Boolean = true,
selectorShape: Shape = RoundedCornerShape(16.dp),
selectorColor: Color = MaterialTheme.colorScheme.primary.copy(alpha = 0.2f),
Expand All @@ -54,6 +55,7 @@ fun WheelDateTimePicker(
size = DpSize(size.width * 2 / 3, size.height),
textStyle = textStyle,
textColor = textColor,
infiniteLoopEnabled = infiniteLoopEnabled,
selectorEnabled = false,
onScrollFinished = {
localDate.value = it
Expand All @@ -64,6 +66,7 @@ fun WheelDateTimePicker(
size = DpSize(size.width / 3, size.height),
textStyle = textStyle,
textColor = textColor,
infiniteLoopEnabled = infiniteLoopEnabled,
selectorEnabled = false,
onScrollFinished = {
localTime.value = it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ fun WheelTextPicker(
texts: List<String>,
textStyle: TextStyle = MaterialTheme.typography.titleMedium,
textColor: Color = LocalContentColor.current,
infiniteLoopEnabled: Boolean = false,
selectorEnabled: Boolean = true,
selectorShape: Shape = RoundedCornerShape(0.dp),
selectorColor: Color = MaterialTheme.colorScheme.primary.copy(alpha = 0.2f),
Expand All @@ -30,6 +31,7 @@ fun WheelTextPicker(
size = size,
selectedIndex = selectedIndex,
count = texts.size,
infiniteLoopEnabled = infiniteLoopEnabled,
selectorEnabled = selectorEnabled,
selectorShape = selectorShape,
selectorColor = selectorColor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fun WheelTimePicker(
size: DpSize = DpSize(128.dp, 128.dp),
textStyle: TextStyle = MaterialTheme.typography.titleMedium,
textColor: Color = LocalContentColor.current,
infiniteLoopEnabled: Boolean = false,
selectorEnabled: Boolean = true,
selectorShape: Shape = RoundedCornerShape(16.dp),
selectorColor: Color = MaterialTheme.colorScheme.primary.copy(alpha = 0.2f),
Expand Down Expand Up @@ -67,6 +68,7 @@ fun WheelTimePicker(
texts = hourTexts,
textStyle = textStyle,
textColor = textColor,
infiniteLoopEnabled = infiniteLoopEnabled,
selectedIndex = localTimeNow.hour,
selectorEnabled = false,
onScrollFinished = { selectedIndex ->
Expand All @@ -89,6 +91,7 @@ fun WheelTimePicker(
texts = minuteTexts,
textStyle = textStyle,
textColor = textColor,
infiniteLoopEnabled = infiniteLoopEnabled,
selectedIndex = localTimeNow.minute,
selectorEnabled = false,
onScrollFinished = { selectedIndex ->
Expand Down

0 comments on commit 66f07be

Please sign in to comment.