I couldn't find this particular bit of code anywhere and so I figured it out myself. Used it for my Less Note 1.0.0 drawing/sketching/writing app currently waiting for review.
Hope this is helpful.
B4X:
Sub DrawPanel_Touch(Action As Int, X As Float, Y As Float)
Select Action
Case DrawPanel.ACTION_DOWN
x2 = X
y2 = Y
Case DrawPanel.ACTION_MOVE
cvsDrawPad.DrawLine(X, Y, x2, y2, penColor, penwidth)
x2 = X
y2 = Y
cvsDrawPad.Refresh
End Select
End Sub
Hope this is helpful.