Back to project page UltraExplorer.
The source code is released under:
GNU General Public License
If you think the Android project UltraExplorer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.mirrorlabs.customcheckboxwidget; /* w w w.j a va2s. com*/ import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.CheckBox; public class DontPressWithParentCheckBox extends CheckBox { public DontPressWithParentCheckBox(Context context) { super(context); } public DontPressWithParentCheckBox(Context context, AttributeSet attrs) { super(context, attrs); } public DontPressWithParentCheckBox(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override public void setPressed(boolean pressed) { // Make sure the parent is a View prior casting it to View if (pressed && getParent() instanceof View && ((View) getParent()).isPressed()) { return; } super.setPressed(pressed); } }