Code example for EditText

Methods: setFilters

0
            mListener.onColorChanged(color);
        } 
    } 
 
    public void setAlphaSliderVisible(boolean visible) {
        mHexColorInput.setFilters(new InputFilter[] { new InputFilter.LengthFilter(visible ? 8 : 6) } );
        mColorPicker.setAlphaSliderVisible(visible);
    } 
 
    public int getColor() { 
        return mColorPicker.getColor();
    } 
 
    @SuppressWarnings("unchecked") 
    public int getPulseSpeedOn() { 
        return ((Pair<String, Integer>) mPulseSpeedOn.getSelectedItem()).second;
    } 
 
    @SuppressWarnings("unchecked") 
    public int getPulseSpeedOff() { 
        // return 0 if 'Always on' is selected