I am creating an Android application that programmatically creates an ImageView, to be dragged and placed anywhere on screen. I can drag the view along the screen, but when it i
The view shrinks because at some point you change the view's width/height, i.e. say getRight() - getLeft()
is forced to decrease because there is not enough space on the screen.
Anyway, setting view's coordinates directly is not something you should do. Instead implement your custom ViewGroup/layout:
onLayout()
child.layout(left, top, right, bottom)
For an example see the code of FrameLayout at line 513 and the docs for onLayout().