I want to create a visual editor, where you can connect data interfaces of different components by wires which defines the dataflow between them. It should be something like for example blender node editor. Below I have added a picture that shows the principle.
The problem I'm currently facing with is to make the wire clickable. One idea is, to create a View for each wire with a dynamically drawn line. But in this scenario, the touch area will be too big because Android handles Views as rectangular widgets and in case of multiple wires I will get overlaying wires and so I cannot resolve the touched wire precisely. Do you have an idea how I can test if the touch point crosses a wire or not (with android lib classes, maybe Path)? What I additionally have to say, that the wire should be a bezier spline.