简体   繁体   中英

How can I get the ending (x,y) coordinates of a view?

As far as I read, the method getlocationonscreen() gives the (x,y) coordinates of the top left of the view relative to the screen. How can I get the (x,y) of the bottom right of a view on the screen to know the coordinates of where it started and ended. Please refer to the image below.

图片

您具有左上角的X,Y,因此要获得右下角的宽度和高度。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM