Code example for EditText

Methods: getTextsetSelectionsetText

0
        /* If we don't have displayed values then use the 
         * current number else find the correct value in the 
         * displayed values for the current number. 
         */ 
        if (mDisplayedValues == null) {
            mText.setText(formatNumber(mCurrent));
        } else { 
            mText.setText(mDisplayedValues[mCurrent - mStart]);
        } 
        mMinButton.setText(Integer.toString(mStart));
        mMaxButton.setText(Integer.toString(mEnd));
        mText.setSelection(mText.getText().length());
    } 
 
    private void validateCurrentView(CharSequence str) {
        int val = getSelectedPos(str.toString());
        if ((val >= mStart) && (val <= mEnd)) {
            if (mCurrent != val) {
                mPrevious = mCurrent;
                mCurrent = val;
                notifyChange();