MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / setNativeValue

Function setNativeValue

apps/automated/src/ui/slider/slider-tests.ts:582–592  ·  view source on GitHub ↗
(slider: Slider, value: number)

Source from the content-addressed store, hash-verified

580}
581
582function setNativeValue(slider: Slider, value: number) {
583 if (slider.android) {
584 const seekBar = <android.widget.SeekBar>slider.android;
585 seekBar.setProgress(value);
586 } else if (slider.ios) {
587 slider.ios.value = value;
588
589 // setting value trough code does not send notification, so simulate that manually.
590 slider.ios.sendActionsForControlEvents(UIControlEvents.ValueChanged);
591 }
592}

Callers 1

testActionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected