Spinner 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 Spinner setEnabled method.

This code example shows how to use the following methods: setEnabled
	public void setModifiable(boolean enabled) {
		if(enabled)
			button.setVisibility(VISIBLE);
		else 
			button.setVisibility(INVISIBLE);
		spinner.setEnabled(enabled);
	} 
	 
	public void setLast() { 
		selectionExtra = ":";
	} 
	 
	public String getSelection() {
		return spinner.getSelectedItem().toString() + selectionExtra;
	} 
	 
	private void remove() { 
		if(parentView != null)
			parentView.removeView(this);
		if(tagsFragment != null)
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: setEnabled
        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();
        if (isPersistent()) { 
            // No need to save instance state since it's persistent 
            return superState;
        } 
 
        final SavedState myState = new SavedState(superState);
        if (mEnabledCheckbox != null) {
            myState.mEnabled = mEnabledCheckbox.isChecked();
        } 
Full Snippet Info
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: setEnabled
    @Override 
    public void onClick(View v) {
        if (v == mEnabledCheckBox) {
            boolean enabled = mEnabledCheckBox.isChecked();
            mPasswordEdit.setEnabled(enabled);
            mWepTypeSpinner.setEnabled(enabled);
            mShowPasswordCheckBox.setEnabled(enabled);
            if (!enabled) {
                password = ""; // always resets the password
            } 
        } else if (v == mShowPasswordCheckBox) {
            setShowPassword(mShowPasswordCheckBox.isChecked());
        } 
    } 
 
    private void setShowPassword(boolean showPassword) {
        mPasswordEdit.setInputType(InputType.TYPE_CLASS_TEXT
                        | (showPassword ? InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
                                        : InputType.TYPE_TEXT_VARIATION_PASSWORD));
    } 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: setEnabled, getSelectedItemPosition
                mAutoLoginHandler = null;
            } 
            hideAutoLogin(true); 
        } else if (mAutoLoginLogin == v) {
            if (mAutoLoginHandler != null) {
                mAutoLoginAccount.setEnabled(false);
                mAutoLoginLogin.setEnabled(false);
                mAutoLoginProgress.setVisibility(View.VISIBLE);
                mAutoLoginError.setVisibility(View.GONE);
                mAutoLoginHandler.login(
                        mAutoLoginAccount.getSelectedItemPosition(), this);
            } 
        } 
    } 
 
    public void updateAutoLogin(Tab tab, boolean animate) {
//        DeviceAccountLogin login = tab.getDeviceAccountLogin(); 
//        if (login != null) { 
//            mAutoLoginHandler = login; 
//            ContextThemeWrapper wrapper = new ContextThemeWrapper(mContext, 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: setVisibility, setEnabled
 
	} 
 
	public void showActivityUI(boolean shouldShow) {
		mStartButton.setEnabled(shouldShow);
		mActivities.setEnabled(shouldShow);
		if (shouldShow) {
			mStartButton.setVisibility(View.VISIBLE);
			mActivities.setVisibility(View.VISIBLE);
			mLabel.setVisibility(View.VISIBLE);
		} else { 
			mStartButton.setVisibility(View.GONE);
			mActivities.setVisibility(View.GONE);
			mLabel.setVisibility(View.GONE);
		} 
	} 
 
	/** 
	 * Populates the activity selection spinner and activates start button if 
	 * needed. 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: setAdapter, setEnabled
	 
	public void setAdapter(Cursor c, String from) {
		// Close previous cursor 
		closeAdapterCursor(); 
		 
		spinner.setAdapter(createSpinnerCursorAdapter(c, from));
		spinner.setEnabled(c != null && c.getCount() > 1);
	} 
	 
	public void closeAdapterCursor() { 
		try { 
			((SimpleCursorAdapter)spinner.getAdapter()).getCursor().close();
		} catch (NullPointerException npe) {
			// Nothing to be done 
		} 
	} 
	 
	/** 
	 * Set spinner to position corresponding to value 
	 * @param spinner 
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: setEnabled
        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();
        if (isPersistent()) { 
            // No need to save instance state since it's persistent 
            return superState;
        } 
 
        final SavedState myState = new SavedState(superState);
        if (mEnabledCheckbox != null) {
            myState.mEnabled = mEnabledCheckbox.isChecked();
        } 
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: setEnabled
			resolutionSpinner.setEnabled(true);
		} 
		else 
		{ 
			resolutionText.setEnabled(false);
			resolutionSpinner.setEnabled(false);
		} 
	} 
	private class itemSelectedListener implements OnItemSelectedListener {
 
	    public void onItemSelected(AdapterView<?> parent,
	        View view, int pos, long id) {
	    	toggleResolution(); 
	    } 
 
	    @SuppressWarnings("rawtypes") 
		public void onNothingSelected(AdapterView parent) {
	      // Do nothing. 
	    } 
	} 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: setAdapter, setEnabled
 
		if (arg0.equals(spin1)) {
			if (arg3 == 0) {
				ArrayAdapter adapter = new ArrayAdapter<String>(this,
						android.R.layout.simple_spinner_item, SPINNER2);
				spin2.setAdapter(adapter);
				spin2.setEnabled(true);
			} else { 
				spin2.setEnabled(false);
			} 
		} 
 
	} 
 
	@Override 
	public void onNothingSelected(AdapterView<?> arg0) {
		// TODO Auto-generated method stub 
 
	} 
 
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods: setEnabled
        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();
        if (isPersistent()) { 
            // No need to save instance state since it's persistent 
            return superState;
        } 
 
        final SavedState myState = new SavedState(superState);
        if (mEnabledCheckbox != null) {
            myState.mEnabled = mEnabledCheckbox.isChecked();
        } 
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Spinner setEnabled Questions & Answers:

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