简体   繁体   中英

How can i get the bottom center x,y of my image view in android?

I have tried this code,

float blackCenterX = blackX +black.getWidth() / 2;

but what formula should I use if I am looking for the bottom center coordinates of the image?

Here's how to get the Center|Bottom position of a View:

+-------+
| View  |
+---X---+
    |
    |___ (X = view.width / 2, Y = view.height)

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