function ScrollView(theme) {
        theme = theme || Theme.DEFAULT;
        let thiz = this;
        this._scrollView = new ScrollView_(CONTEXT);
        this._scroller = new LinearLayout_(CONTEXT);
        this._track = new TextView_(CONTEXT);
        this._thumb = new TextView_(CONTEXT);
        this._theme = theme;
        this._width = DP * 340;
        this._scrollView.setLayoutParams(new LinearLayout_.LayoutParams(this._width - DP * 6, -1));
        this._scrollView.setOnScrollChangeListener(new View_.OnScrollChangeListener({
            onScrollChange(v, scrollX, scrollY, oldScrollX, oldScrollY) {
                CONTEXT.runOnUiThread({
                    run() {
                        thiz._track.setLayoutParams(new LinearLayout_.LayoutParams(DP * 12, v.getHeight() * scrollY / v.getChildAt(0).getHeight()));
                    }
                });
            }
        }));
        this._scrollView.setOverScrollMode(View_.OVER_SCROLL_NEVER);
        this._scrollView.setVerticalScrollBarEnabled(false);
        this._scrollView.setHorizontalScrollBarEnabled(false);
        this._scroller.addView(this._track);
        this._scroller.addView(this._thumb);
        this._scroller.setOrientation(1);
        this._track.setLayoutParams(new LinearLayout_.LayoutParams(DP * 6, 0));
        this._thumb.setBackgroundDrawable(new ColorDrawable_(theme.getProgressWindow(Theme.EFFECT_COLOR)));
        this._thumb.setLayoutParams(new LinearLayout_.LayoutParams(DP * 6, DP * 36));
        this._thumb.setOnTouchListener(new View_.OnTouchListener({
            onTouch(v, event) {
                let y = event.getRawY();
                if (event.getAction() === MotionEvent_.ACTION_MOVE) {
                    thiz._track.setLayoutParams(new LinearLayout_.LayoutParams(DP * 12, thiz._scrollView.getChildAt(0).getHeight() * y / (thiz._scrollView.getHeight() - DP * 18)));
                    thiz._scrollView.scrollTo(0, thiz._scrollView.getChildAt(0).getHeight() * y / (thiz._scrollView.getHeight() - DP * 18));
                }
                return true;
            }
        }));
    }
/**
     * Class representing a scroll view.
     * @since 2016-09-06
     * @class
     * @memberOf me.astro.widget
     * @param {me.astro.design.Theme} [theme=me.astro.design.Theme.DEFAULT] Theme of scroll view
     */
Class representing a scroll view.
Class representing a scroll view .
function ScrollView(theme) {
        theme = theme || Theme.DEFAULT;
        let thiz = this;
        this._scrollView = new ScrollView_(CONTEXT);
        this._scroller = new LinearLayout_(CONTEXT);
        this._track = new TextView_(CONTEXT);
        this._thumb = new TextView_(CONTEXT);
        this._theme = theme;
        this._width = DP * 340;
        this._scrollView.setLayoutParams(new LinearLayout_.LayoutParams(this._width - DP * 6, -1));
        this._scrollView.setOnScrollChangeListener(new View_.OnScrollChangeListener({
            onScrollChange(v, scrollX, scrollY, oldScrollX, oldScrollY) {
                CONTEXT.runOnUiThread({
                    run() {
                        thiz._track.setLayoutParams(new LinearLayout_.LayoutParams(DP * 12, v.getHeight() * scrollY / v.getChildAt(0).getHeight()));
                    }
                });
            }
        }));
        this._scrollView.setOverScrollMode(View_.OVER_SCROLL_NEVER);
        this._scrollView.setVerticalScrollBarEnabled(false);
        this._scrollView.setHorizontalScrollBarEnabled(false);
        this._scroller.addView(this._track);
        this._scroller.addView(this._thumb);
        this._scroller.setOrientation(1);
        this._track.setLayoutParams(new LinearLayout_.LayoutParams(DP * 6, 0));
        this._thumb.setBackgroundDrawable(new ColorDrawable_(theme.getProgressWindow(Theme.EFFECT_COLOR)));
        this._thumb.setLayoutParams(new LinearLayout_.LayoutParams(DP * 6, DP * 36));
        this._thumb.setOnTouchListener(new View_.OnTouchListener({
            onTouch(v, event) {
                let y = event.getRawY();
                if (event.getAction() === MotionEvent_.ACTION_MOVE) {
                    thiz._track.setLayoutParams(new LinearLayout_.LayoutParams(DP * 12, thiz._scrollView.getChildAt(0).getHeight() * y / (thiz._scrollView.getHeight() - DP * 18)));
                    thiz._scrollView.scrollTo(0, thiz._scrollView.getChildAt(0).getHeight() * y / (thiz._scrollView.getHeight() - DP * 18));
                }
                return true;
            }
        }));
    }
function ScrollView ( theme ) { theme = theme || Theme . DEFAULT ; let thiz = this ; this . _scrollView = new ScrollView_ ( CONTEXT ) ; this . _scroller = new LinearLayout_ ( CONTEXT ) ; this . _track = new TextView_ ( CONTEXT ) ; this . _thumb = new TextView_ ( CONTEXT ) ; this . _theme = theme ; this . _width = DP * 340 ; this . _scrollView . setLayoutParams ( new LinearLayout_ . LayoutParams ( this . _width - DP * 6 , - 1 ) ) ; this . _scrollView . setOnScrollChangeListener ( new View_ . OnScrollChangeListener ( { onScrollChange ( v , scrollX , scrollY , oldScrollX , oldScrollY ) { CONTEXT . runOnUiThread ( { run ( ) { thiz . _track . setLayoutParams ( new LinearLayout_ . LayoutParams ( DP * 12 , v . getHeight ( ) * scrollY / v . getChildAt ( 0 ) . getHeight ( ) ) ) ; } } ) ; } } ) ) ; this . _scrollView . setOverScrollMode ( View_ . OVER_SCROLL_NEVER ) ; this . _scrollView . setVerticalScrollBarEnabled ( false ) ; this . _scrollView . setHorizontalScrollBarEnabled ( false ) ; this . _scroller . addView ( this . _track ) ; this . _scroller . addView ( this . _thumb ) ; this . _scroller . setOrientation ( 1 ) ; this . _track . setLayoutParams ( new LinearLayout_ . LayoutParams ( DP * 6 , 0 ) ) ; this . _thumb . setBackgroundDrawable ( new ColorDrawable_ ( theme . getProgressWindow ( Theme . EFFECT_COLOR ) ) ) ; this . _thumb . setLayoutParams ( new LinearLayout_ . LayoutParams ( DP * 6 , DP * 36 ) ) ; this . _thumb . setOnTouchListener ( new View_ . OnTouchListener ( { onTouch ( v , event ) { let y = event . getRawY ( ) ; if ( event . getAction ( ) === MotionEvent_ . ACTION_MOVE ) { thiz . _track . setLayoutParams ( new LinearLayout_ . LayoutParams ( DP * 12 , thiz . _scrollView . getChildAt ( 0 ) . getHeight ( ) * y / ( thiz . _scrollView . getHeight ( ) - DP * 18 ) ) ) ; thiz . _scrollView . scrollTo ( 0 , thiz . _scrollView . getChildAt ( 0 ) . getHeight ( ) * y / ( thiz . _scrollView . getHeight ( ) - DP * 18 ) ) ; } return true ; } } ) ) ; }
Class representing a scroll view.
Class representing a scroll view .