Code example for AccessibilityNodeInfo

Methods: setCheckable, setChecked, setClassName

0
	@Override 
	public void onInitializeAccessibilityNodeInfo( AccessibilityNodeInfo info ) {
		super.onInitializeAccessibilityNodeInfo( info );
 
		if ( android.os.Build.VERSION.SDK_INT >= 14 ) {
			info.setClassName( AviaryHighlightImageButton.class.getName() );
		} 
 
		info.setCheckable( mToggleEnabled );
		info.setChecked( mChecked );
	} 
 
	@Override 
	public void setPressed( boolean pressed ) {
		super.setPressed( pressed );
 
		final Drawable d = getDrawable();
 
		if ( null != d && null != mBlendMode ) {
			updateDrawable( d, pressed, isChecked(), isSelected() );
		}