TextView setEnabled - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for TextView setEnabled method.

This code example shows how to use the following methods: setChecked, setEnabled
    } 
 
    @Override 
    public void onCheckedChanged(CompoundButton buttonView, boolean desiredState) {
        boolean success = false;
        mActionBarSwitch.setEnabled(false);
        if (desiredState) {
            success = mNfcAdapter.enableNdefPush();
        } else { 
            success = mNfcAdapter.disableNdefPush();
        } 
        if (success) {
            mActionBarSwitch.setChecked(desiredState);
        } 
        mActionBarSwitch.setEnabled(true);
    } 
} 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setVisibility, setEnabled
    private void updateVolumeNoticeVisibility(int value) {
        boolean visible = value > mMinVolumeSeekBar.getSecondaryProgress();
        if (!mEnabledCheckbox.isChecked()) {
            visible = false;
        } 
        mRingVolumeNotice.setVisibility(visible ? View.VISIBLE : View.GONE);
    } 
 
    private void updateEnabledStates() { 
        boolean enable = mEnabledCheckbox.isChecked();
        mMinVolumeTitle.setEnabled(enable);
        mMinVolumeSeekBar.setEnabled(enable);
        mRingVolumeNotice.setEnabled(enable);
        mIntervalTitle.setEnabled(enable);
        mInterval.setEnabled(enable);
    } 
 
    @Override 
    protected Parcelable onSaveInstanceState() {
        final Parcelable superState = super.onSaveInstanceState();
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: isChecked, setOnCheckedChangeListener, setChecked, setEnabled
            case BluetoothAdapter.STATE_TURNING_OFF:
                mSwitch.setEnabled(false);
                break; 
            case BluetoothAdapter.STATE_OFF:
                setChecked(false); 
                mSwitch.setEnabled(true);
                break; 
            default: 
                setChecked(false); 
                mSwitch.setEnabled(true);
        } 
    } 
 
    private void setChecked(boolean isChecked) {
        if (isChecked != mSwitch.isChecked()) {
            // set listener to null, so onCheckedChanged won't be called 
            // if the checked status on Switch isn't changed by user click 
            if (mValidListener) {
                mSwitch.setOnCheckedChangeListener(null);
            } 

8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setEnabled
        mValidateButton.setOnClickListener(mClickListener);
    } 
 
    View.OnClickListener mClickListener = new View.OnClickListener() {
        public void onClick(View v) { 
            mValidateButton.setEnabled(false); 
            mValidateThread = new Validator(); 
            mValidateThread.execute(LargeAssetTest.this.getAssets()); 
        } 
    }; 
 
    /** 
     * Validation happens in a separate thread 
     */ 
    class Validator extends AsyncTask<AssetManager, Integer, Boolean> {
        static final String TAG = "Validator";
 
        @Override 
        protected Boolean doInBackground(AssetManager... params) {
            AssetManager am = params[0];
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setEnabled
    public void onBackPressed() { 
    } 
 
    @Override 
    public void onCheckedChanged(CompoundButton button, boolean checked) {
        mButton.setEnabled(checked);
    } 
 
    @Override 
    public void onClick(DialogInterface dialog, int which) {
        try { 
            if (which == DialogInterface.BUTTON_POSITIVE && mService.prepareVpn(null, mPackage)) {
                setResult(RESULT_OK); 
            } 
        } catch (Exception e) {
            Log.e(TAG, "onClick", e);
        } 
    } 
} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related TextView setEnabled Questions & Answers:

Other TextView setEnabled Examples

61:					Log.e("TTS", "This Language is not supported");
62:				} else {
63:					btnSpeak.setEnabled(true);
64:					speakOut();
65:				}

Read More

setEnabled Method Overview
Set the enabled state of this view.
See Code Examples for other Android TextView Methods: