Checkable isChecked - top ranked examples from Open Source projects

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

This code example shows how to use the following methods:isChecked
        child = (Checkable) getChildAt(CHECKABLE_CHILD_INDEX);
    } 
 
    @Override 
    public boolean isChecked() { 
        return child.isChecked(); 
    } 
 
    @Override 
    public void setChecked(boolean checked) {
        child.setChecked(checked);
    } 
 
    @Override 
    public void toggle() { 
        child.toggle();
    } 
     
} 
7
CodeRank
This code example shows how to use the following methods:isChecked
        child = (Checkable) getChildAt(CHECKABLE_CHILD_INDEX);
    } 
 
    @Override 
    public boolean isChecked() { 
        return child.isChecked();
    } 
 
    @Override 
    public void setChecked(boolean checked) {
        child.setChecked(checked);
    } 
 
    @Override 
    public void toggle() { 
        child.toggle();
    } 
 
} 
6
CodeRank
This code example shows how to use the following methods:isChecked
	} 
 
	@Override 
	public boolean isChecked() { 
		if (mCheckableChild != null) {
			return mCheckableChild.isChecked();
		} 
		return mChecked;
	} 
 
	@Override 
	public void toggle() { 
		if (mCheckableChild != null) {
			mCheckableChild.toggle();
		} 
		mChecked = ! mChecked;
	} 
 
	// Drag and Drop 
	@Override 
4
CodeRank
This code example shows how to use the following methods:isChecked
		setResult(RESULT_CANCELED);
		finish();
	} 
 
	private boolean validateAgreement() { 
		if (!chkAge.isChecked()) {
			Toast.makeText(this,
					"Please confirm that you are at least 13 years of age.", 
					Toast.LENGTH_LONG).show();
			return false; 
		} 
 
		if (!chkRead.isChecked()) {
			Toast.makeText(
					this,
					"Please confirm that you understand and accept the agreement.", 
					Toast.LENGTH_LONG).show();
			return false; 
		} 
 
4
CodeRank
This code example shows how to use the following methods:isChecked
	 * Delegates to (Checkable) getTag(). 
	 */ 
	public boolean isChecked() { 
		try { 
			Checkable checkableTag = (Checkable) getTag();
			return checkableTag.isChecked();
		} catch (ClassCastException e) {
			Log.w("CheckableRelativeLayout",
					"Tag is not an instance of Checkable; this object won't do anything useful."); 
		} catch (NullPointerException e) {
			Log.w("CheckableRelativeLayout",
					"Tag is null; this object won't do anything useful."); 
		} 
		return false; 
	} 
 
	/** 
	 * Delegates to (Checkable) getTag(). 
	 */ 
	public void setChecked(boolean checked) {
4
CodeRank
This code example shows how to use the following methods:isChecked
 
        this.checked = checked;
    } 
 
    protected boolean matchesSafely(Checkable checkable) {
        return checkable.isChecked() == checked;
    } 
 
    public void describeTo(Description description) {
        description.appendText(checked ? "checked" : "unchecked");
    } 
 
    public static Matcher<Checkable> checked() {
        return new IsCheckedMatcher(true); 
    } 
 
    public static Matcher<Checkable> unchecked() {
        return new IsCheckedMatcher(false); 
    } 
} 
4
CodeRank
This code example shows how to use the following methods:isChecked
        } 
    } 
 
    @Override 
    public boolean isChecked() { 
        return mCheckableView != null && mCheckableView.isChecked();
    } 
 
    @Override 
    public void setChecked(boolean checked) {
        if (mCheckableView != null) {
            mCheckableView.setChecked(checked);
        } 
    } 
 
    @Override 
    public void toggle() { 
        if (mCheckableView != null) {
            mCheckableView.toggle();
        } 
4
CodeRank
This code example shows how to use the following methods:isChecked
        } 
    } 
 
    @Override 
    public boolean isChecked() { 
        return (checkable != null) ? checkable.isChecked() : false;
    } 
 
    @Override 
    public void setChecked (final boolean checked) {
        if (checkable != null) {
	        checkable.setChecked(checked);
	    } 
    } 
 
    @Override 
    public void toggle() { 
        if (checkable != null) {
            checkable.toggle();
        } 
4
CodeRank
This code example shows how to use the following methods:isChecked
		} 
	} 
	@Override 
	public boolean isChecked() { 
		if(mCheckable != null){
			return mCheckable.isChecked();
		} 
		return false; 
	} 
	@Override 
	public void setChecked(boolean checked) {
		if(mCheckable != null){
			mCheckable.setChecked(checked);
		} 
	} 
	@Override 
	public void toggle() { 
		if(mCheckable != null){
			mCheckable.toggle();
		} 
4
CodeRank
This code example shows how to use the following methods:isChecked
		} 
	} 
	@Override 
	public boolean isChecked() { 
		if(mCheckable != null){
			return mCheckable.isChecked();
		} 
		return false; 
	} 
	@Override 
	public void setChecked(boolean checked) {
		if(mCheckable != null){
			mCheckable.setChecked(checked);
		} 
	} 
	@Override 
	public void toggle() { 
		if(mCheckable != null){
			mCheckable.toggle();
		} 
4
CodeRank
isChecked Method Overview
See Code Examples for other Android Checkable Methods: