Back to project page FlashAndroid.
The source code is released under:
GNU General Public License
If you think the Android project FlashAndroid 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 flash.android.ui; //from www .j av a 2s.c o m import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; public class CheckBoxClip extends CompoundButtonClip { public CheckBoxClip(Context context) { super(context); } public CheckBoxClip(Context context, AttributeSet attrs) { super(context, attrs); } public CheckBoxClip(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override public boolean onTouchEvent(MotionEvent event) { if (isClipMode()) { switch (event.getAction()) { case MotionEvent.ACTION_UP: doCheck(!isChecked()); break; } return true; } else { return super.onTouchEvent(event); } } }