We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1562494 commit f7834e5Copy full SHA for f7834e5
app/src/main/java/com/tencent/iot/explorer/link/kitlink/holder/ControlSimpleNumberBigHolder.kt
@@ -28,7 +28,12 @@ class ControlSimpleNumberBigHolder : CRecyclerView.CViewHolder<DevicePropertyEnt
28
numberEntity?.min?.toDouble()?.toInt() ?: 0,
29
numberEntity?.max?.toDouble()?.toInt() ?: 100
30
)
31
- itemView.sp_simple_big_int.setStepValue(numberEntity?.step?.toInt() ?: 1)
+ val step = try {
32
+ numberEntity?.step?.toInt() ?: 1
33
+ } catch (e: NumberFormatException) {
34
+ numberEntity?.step?.toDouble()?.toInt() ?: 1
35
+ }
36
+ itemView.sp_simple_big_int.setStepValue(step)
37
38
if (DataHolder.instance.get<DeviceEntity>("device")?.online ?: 0 == 1) {
39
itemView.sp_simple_big_int.onProgressListener =
0 commit comments