|
|
@@ -3,12 +3,12 @@
|
|
|
*/
|
|
|
package kr.co.zumo.app.lifeplus.view.custom;
|
|
|
|
|
|
+import android.annotation.SuppressLint;
|
|
|
import android.content.Context;
|
|
|
import android.support.constraint.ConstraintLayout;
|
|
|
import android.util.AttributeSet;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.MotionEvent;
|
|
|
-import android.view.View;
|
|
|
import android.widget.Checkable;
|
|
|
import android.widget.ImageView;
|
|
|
|
|
|
@@ -40,15 +40,13 @@ public abstract class AbstractCheckbox extends ConstraintLayout implements Check
|
|
|
|
|
|
protected abstract void init(Context context);
|
|
|
|
|
|
+ @SuppressLint("ClickableViewAccessibility")
|
|
|
protected final void attachEvent() {
|
|
|
- this.setOnTouchListener(new OnTouchListener() {
|
|
|
- @Override
|
|
|
- public boolean onTouch(View v, MotionEvent event) {
|
|
|
- if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
|
|
- setChecked(!isChecked, true);
|
|
|
- }
|
|
|
- return false;
|
|
|
+ this.setOnTouchListener((v, event) -> {
|
|
|
+ if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
|
|
+ setChecked(!isChecked, true);
|
|
|
}
|
|
|
+ return false;
|
|
|
});
|
|
|
}
|
|
|
|