public void setMonthParams(HashMap<String, Integer> params) {
        if (!params.containsKey(VIEW_PARAMS_MONTH) && !params.containsKey(VIEW_PARAMS_YEAR)) {
            throw new InvalidParameterException("You must specify the month and year for this view");
        }
        setTag(params);
        // We keep the current value for any params not present
        if (params.containsKey(VIEW_PARAMS_HEIGHT)) {
            mRowHeight = params.get(VIEW_PARAMS_HEIGHT);
            if (mRowHeight < MIN_HEIGHT) {
                mRowHeight = MIN_HEIGHT;
            }
        }
        if (params.containsKey(VIEW_PARAMS_SELECTED_DAY)) {
            mSelectedDay = params.get(VIEW_PARAMS_SELECTED_DAY);
        }

        // Allocate space for caching the day numbers and focus values
        mMonth = params.get(VIEW_PARAMS_MONTH);
        mYear = params.get(VIEW_PARAMS_YEAR);

        // Figure out what day today is
        final Time today = new Time(Time.getCurrentTimezone());
        today.setToNow();
        mHasToday = false;
        mToday = -1;

        mCalendar.set(Calendar.MONTH, mMonth);
        mCalendar.set(Calendar.YEAR, mYear);
        mCalendar.set(Calendar.DAY_OF_MONTH, 1);
        mDayOfWeekStart = mCalendar.get(Calendar.DAY_OF_WEEK);

        if (params.containsKey(VIEW_PARAMS_WEEK_START)) {
            mWeekStart = params.get(VIEW_PARAMS_WEEK_START);
        } else {
            mWeekStart = mCalendar.getFirstDayOfWeek();
        }

        mNumCells = DateTimePickerUtils.getDaysInMonth(mMonth, mYear);
        for (int i = 0; i < mNumCells; i++) {
            final int day = i + 1;
            if (sameDay(day, today)) {
                mHasToday = true;
                mToday = day;
            }
        }
        mNumRows = calculateNumRows();

        // Invalidate cached accessibility information.
        mNodeProvider.invalidateParent();
    }
public void setMonthParams ( HashMap < String , Integer > params ) { if ( ! params . containsKey ( VIEW_PARAMS_MONTH ) && ! params . containsKey ( VIEW_PARAMS_YEAR ) ) { throw new InvalidParameterException ( "You must specify the month and year for this view" ) ; } setTag ( params ) ; if ( params . containsKey ( VIEW_PARAMS_HEIGHT ) ) { mRowHeight = params . get ( VIEW_PARAMS_HEIGHT ) ; if ( mRowHeight < MIN_HEIGHT ) { mRowHeight = MIN_HEIGHT ; } } if ( params . containsKey ( VIEW_PARAMS_SELECTED_DAY ) ) { mSelectedDay = params . get ( VIEW_PARAMS_SELECTED_DAY ) ; } mMonth = params . get ( VIEW_PARAMS_MONTH ) ; mYear = params . get ( VIEW_PARAMS_YEAR ) ; final Time today = new Time ( Time . getCurrentTimezone ( ) ) ; today . setToNow ( ) ; mHasToday = false ; mToday = - 1 ; mCalendar . set ( Calendar . MONTH , mMonth ) ; mCalendar . set ( Calendar . YEAR , mYear ) ; mCalendar . set ( Calendar . DAY_OF_MONTH , 1 ) ; mDayOfWeekStart = mCalendar . get ( Calendar . DAY_OF_WEEK ) ; if ( params . containsKey ( VIEW_PARAMS_WEEK_START ) ) { mWeekStart = params . get ( VIEW_PARAMS_WEEK_START ) ; } else { mWeekStart = mCalendar . getFirstDayOfWeek ( ) ; } mNumCells = DateTimePickerUtils . getDaysInMonth ( mMonth , mYear ) ; for ( int i = 0 ; i < mNumCells ; i ++ ) { final int day = i + 1 ; if ( sameDay ( day , today ) ) { mHasToday = true ; mToday = day ; } } mNumRows = calculateNumRows ( ) ; mNodeProvider . invalidateParent ( ) ; }
Sets all the parameters for displaying this week. The only required
parameter is the week number. Other parameters have a default value and
will only update if a new value is included, except for focus month,
which will always default to no focus month if no value is passed in. See
{@link #VIEW_PARAMS_HEIGHT} for more info on parameters.

@param params A map of the new parameters, see
{@link #VIEW_PARAMS_HEIGHT}