File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
java/no/nordicsemi/android/common/test/main/page Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ private fun OtherWidgets() {
178178
179179 var sliderValue by rememberSaveable { mutableFloatStateOf(5.0f ) }
180180 Text (
181- text = stringResource(id = R .string.slider , sliderValue.toInt()),
181+ text = stringResource(id = R .string.slider_int , sliderValue.toInt()),
182182 )
183183 Slider (
184184 value = sliderValue,
@@ -187,6 +187,18 @@ private fun OtherWidgets() {
187187 steps = 9 ,
188188 colors = NordicSliderDefaults .colors()
189189 )
190+
191+ var disabledSliderValue by rememberSaveable { mutableFloatStateOf(5.0f ) }
192+ Text (
193+ text = stringResource(id = R .string.slider_float, disabledSliderValue),
194+ )
195+ Slider (
196+ value = disabledSliderValue,
197+ valueRange = 0.0f .. 10.0f ,
198+ onValueChange = { disabledSliderValue = it },
199+ enabled = checkedSwitch,
200+ colors = NordicSliderDefaults .colors()
201+ )
190202 }
191203}
192204
Original file line number Diff line number Diff line change 7070 <string name =" action_dialog" >Open Dialog</string >
7171
7272 <string name =" option" >Important option</string >
73- <string name =" slider" >Value: %d</string >
73+ <string name =" slider_int" >Value: %d</string >
74+ <string name =" slider_float" >Value: %2.2f</string >
7475
7576 <string name =" hello" >Hello!</string >
7677 <string name =" hello_param" >Param: %d</string >
You can’t perform that action at this time.
0 commit comments