UNPKG

@nativescript/core

Version:

A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.

33 lines (32 loc) 1.62 kB
import { Background } from '../styling/background'; import { SliderBase, valueProperty, minValueProperty, maxValueProperty } from './slider-common'; import { colorProperty, backgroundColorProperty, backgroundInternalProperty } from '../styling/style-properties'; import { Color } from '../../color'; export * from './slider-common'; interface OwnerSeekBar extends android.widget.SeekBar { owner: Slider; } export declare class Slider extends SliderBase { [valueProperty.setNative]: (value: number) => void; [minValueProperty.setNative]: (value: number) => void; [maxValueProperty.getDefault]: () => number; [maxValueProperty.setNative]: (value: number) => void; [colorProperty.getDefault]: () => number; [colorProperty.setNative]: (value: number | Color) => void; [backgroundColorProperty.getDefault]: () => number; [backgroundColorProperty.setNative]: (value: number | Color) => void; [backgroundInternalProperty.getDefault]: () => Background; [backgroundInternalProperty.setNative]: (value: Background) => void; _supressNativeValue: boolean; nativeViewProtected: OwnerSeekBar; createNativeView(): globalAndroid.widget.SeekBar; initNativeView(): void; disposeNativeView(): void; resetNativeView(): void; /** * There is no minValue in Android. We simulate this by subtracting the minValue from the native value and maxValue. * We need this method to call native setMax and setProgress methods when minValue property is changed, * without handling the native value changed callback. */ private setNativeValuesSilently; }