Code example for NumberPicker

Methods: setRange

0
 
        if (mMHzPicker != null) {
           mMHzPicker.setRange(mMin / 1000, mMax / 1000);
        } 
        if (mKHzPicker != null) {
           mKHzPicker.setRange(1, khzNumSteps, khzStrings);
        } 
    } 
 
    private void updateSpinners() { 
        int khzNumSteps = getKHzCount(mStep);
        updateSpinnerRange(); 
        mMhz = (int)(mFrequency / 1000);
        mKhz = getCurrentKHz(mFrequency, mMin, mStep) ;
        if((mMin / 1000 <= mMhz) && (mMax / 1000 >= mMhz))
        { 
            mMHzPicker.setCurrent(mMhz);
        } 
        if(mKhz <= khzNumSteps)
        { 
            mKHzPicker.setCurrent(mKhz);