Log is never logging ACTION_UP or ACTION_MOVE(which i removed from the code example for shortening)
Here is my shorten version of the code:
public class ProfileBadgeView extends LinearLayout {
Activity act;
public ProfileBadgeView(Context context) {
super(context);
}
public ProfileBadgeView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public ProfileBadgeView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public void initView(Activity act) {
//..init
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
logIntercept("ACTION DOWN");
} else if (ev.getAction() == MotionEvent.ACTION_UP) {
logIntercept("ACTION_UP");
}
return false;
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
return true;
}
private void logIntercept(Object obj) {
Log.i(this.getClass().getSimpleName() + " INTERCEPT :", obj.toString());
}
}