The project is attached: the same code for B4J and B4A.
At start the objects are OK at 0.0 coords.
Under Windows B4J compilation works ideally (object moving along the grid), but under Android - objects are not fit a bit, if to move both objects and try to fit the circles.
Why ?
WARNING: package com.sun.javafx.embed.swing.oldimpl not in javafx.swing
Waiting for debugger to connect...
Program started.
*** mainpage: B4XPage_Created
GridSize = 5
1.0
No !
GridSize = 5dip * 2.8125 = 14.063
But GridSize is an Int. therefore 14 !
Try to set GridSize As Float
Or, maybe,better set :
Private DownX, DownY As Int
And leave GridSize As Int