Resize rectangle by dragging its corners in Android?

http://farm3.anhso.net/upload/20110221/12/o/anhso-121531_example.jpg

Here are examples when you drag A or B, the rectangle will be resized

How can i do this?

+3
source share
1 answer

It is pretty simple. Let me assume that there is only one view in your layout. This makes a few things a lot easier.

, , . , , . , A B. Touch "", . . , , , .

A B, , . , - , , ( ) ( - ).

( x y), . . , .

+3

Source: https://habr.com/ru/post/1793565/


All Articles