library/src/main/java/com/alamkanak/weekview/WeekView.java
/**
     * Vertically scroll to a specific hour in the week view.
     *
     * @param hour The hour to scroll to in 24-hour format. Supported values are 0-24.
     */
Vertically scroll to a specific hour in the week view.
@param hour The hour to scroll to in 24-hour format. Supported values are 0-24.
Vertically scroll to a specific hour in the week view . @param hour The hour to scroll to in 24 - hour format . Supported values are 0 - 24 .
public void goToHour(double hour) {
        if (mAreDimensionsInvalid) {
            mScrollToHour = hour;
            return;
        }
        int verticalOffset = 0;
        if (hour > 24) {
            verticalOffset = mHourHeight * 24;
        } else if (hour > 0) {
            verticalOffset = (int) (mHourHeight * hour);
        }
        if (verticalOffset > mHourHeight * 24 - getHeight() + mHeaderHeight + mHourHeight) {
            verticalOffset = (int) (mHourHeight * 24 - getHeight() + mHeaderHeight + mHourHeight);
        }
        mCurrentOrigin.y = -verticalOffset;
        invalidate();
    }
public void goToHour ( double hour ) { if ( mAreDimensionsInvalid ) { mScrollToHour = hour ; return ; } int verticalOffset = 0 ; if ( hour > 24 ) { verticalOffset = mHourHeight * 24 ; } else if ( hour > 0 ) { verticalOffset = ( int ) ( mHourHeight * hour ) ; } if ( verticalOffset > mHourHeight * 24 - getHeight ( ) + mHeaderHeight + mHourHeight ) { verticalOffset = ( int ) ( mHourHeight * 24 - getHeight ( ) + mHeaderHeight + mHourHeight ) ; } mCurrentOrigin . y = - verticalOffset ; invalidate ( ) ; }
Vertically scroll to a specific hour in the week view.
Vertically scroll to a specific hour in the week view .