@nativescript/core
Version:
A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.
34 lines (33 loc) • 1.72 kB
TypeScript
import { ContentView } from '../content-view';
import { Property } from '../core/properties';
import { EventData } from '../../data/observable';
import { CoreTypes } from '../../core-types';
export interface ScrollEventData extends EventData {
scrollX: number;
scrollY: number;
}
export declare abstract class ScrollViewBase extends ContentView {
static scrollEvent: string;
orientation: CoreTypes.OrientationType;
scrollBarIndicatorVisible: boolean;
isScrollEnabled: boolean;
iosContentInsetAdjustmentBehavior: 'never' | 'automatic' | 'scrollableAxes' | 'always';
private _addedScrollEvent;
addEventListener(eventName: string, callback: (data: EventData) => void, thisArg?: any, once?: boolean): void;
removeEventListener(eventName: string, callback?: (data: EventData) => void, thisArg?: any): void;
initNativeView(): void;
disposeNativeView(): void;
protected attachNative(): void;
protected detachNative(): void;
get horizontalOffset(): number;
get verticalOffset(): number;
get scrollableWidth(): number;
get scrollableHeight(): number;
abstract scrollToVerticalOffset(value: number, animated: boolean): any;
abstract scrollToHorizontalOffset(value: number, animated: boolean): any;
abstract _onOrientationChanged(): any;
}
export declare const orientationProperty: Property<ScrollViewBase, CoreTypes.OrientationType>;
export declare const scrollBarIndicatorVisibleProperty: Property<ScrollViewBase, boolean>;
export declare const isScrollEnabledProperty: Property<ScrollViewBase, boolean>;
export declare const iosContentInsetAdjustmentBehaviorProperty: Property<ScrollViewBase, "never" | "always" | "automatic" | "scrollableAxes">;