Android InputFilter.LengthFilter - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android InputFilter.LengthFilter class.

This code example shows how to use the following methods:
            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() { 
6
CodeRank
This code example shows how to use the following methods:
        filter.addAction(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED);
        getContext().registerReceiver(mReceiver, filter);
 
        // Make sure the OK button is disabled (if necessary) after rotation 
        EditText et = getEditText();
        et.setFilters(new InputFilter[] {new LengthFilter(BLUETOOTH_NAME_MAX_LENGTH)});
        if (et != null) {
            et.addTextChangedListener(this);
            Dialog d = getDialog();
            if (d instanceof AlertDialog) {
                Button b = ((AlertDialog) d).getButton(AlertDialog.BUTTON_POSITIVE);
                b.setEnabled(et.getText().length() > 0);
            } 
        } 
    } 
 
    public void pause() { 
        EditText et = getEditText();
        if (et != null) {
            et.removeTextChangedListener(this);
5
CodeRank
This code example shows how to use the following methods:
            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() { 
4
CodeRank
This code example shows how to use the following methods:
This code example shows how to use the following methods:
            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() { 
4
CodeRank
This code example shows how to use the following methods:
        filter.addAction(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED);
        getContext().registerReceiver(mReceiver, filter);
 
        // Make sure the OK button is disabled (if necessary) after rotation 
        EditText et = getEditText();
        et.setFilters(new InputFilter[] {new LengthFilter(BLUETOOTH_NAME_MAX_LENGTH)});
        if (et != null) {
            et.addTextChangedListener(this);
            Dialog d = getDialog();
            if (d instanceof AlertDialog) {
                Button b = ((AlertDialog) d).getButton(AlertDialog.BUTTON_POSITIVE);
                b.setEnabled(et.getText().length() > 0);
            } 
        } 
    } 
 
    public void pause() { 
        EditText et = getEditText();
        if (et != null) {
            et.removeTextChangedListener(this);
4
CodeRank
This code example shows how to use the following methods:

Related Android InputFilter.LengthFilter Questions & Answers:

See Code Examples for Android InputFilter.LengthFilter Methods: