Add Vibration on changing values
BadKiko opened this issue · 3 comments
BadKiko commented
Add Vibration on changing values
commandiron commented
thanks for the feature you suggested, I have not any practice about vibration implementation before but we can work on this.
BadKiko commented
thanks for the feature you suggested, I have not any practice about vibration implementation before but we can work on this.
this is how i now add vibration but its vibrate in change value moment only
it will be cool feature if it vibrate on scrolling
val v = context.getSystemService(VIBRATOR_SERVICE) as Vibrator?
WheelTimePicker(
timeFormat = if (is24Hour) TimeFormat.HOUR_24 else TimeFormat.AM_PM,
textStyle = MaterialTheme.typography.titleSmall,
startTime = LocalTime.MIN,
selectorProperties = WheelPickerDefaults.selectorProperties(
enabled = true,
shape = RoundedCornerShape(16.dp),
color = MaterialTheme.colorScheme.primary.copy(alpha = 0.2f),
border = BorderStroke(1.dp, MaterialTheme.colorScheme.primary)
)
) { snappedTime ->
if(snappedTime != LocalTime.MIN) {
if (v != null) {
v.vibrate(10)
};
timePickerResult.onResult(time = snappedTime)
}
}
commandiron commented
I am not sure vibrate and feedback must be in this library. I think instead, this feature can be added from user who use this library. So ı am close this issue.