如下为为MyView定义点击中心点触发OnCenterClickListener事件。 public class MyView extends View { private OnCenterClickListener onCenterClickListener ; public MyView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } public MyView(Context context, AttributeSet attrs) { super(context, attrs); } public MyView(Context context) { super(context); } @Override public boolean onTouchEvent(MotionEvent event) { float x = event.getX() ; float y = event.getY() ; if(x==(getLeft()+getWidth()/2)&&y==(getTop()+getHeight()/2)){ onCenterClickListener.onCenterClickListener(); } return super.onTouchEvent(event); } public OnCenterClickListener getOnCenterClickListener() { return onCenterClickListener; } public void setOnCenterClickListener(OnCenterClickListener onCenterClickListener) { this.onCenterClickListener = onCenterClickListener; } public static interface OnCenterClickListener{ public void onCenterClickListener() ; } }