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.