nit21
nit21

Reputation: 165

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?

Upvotes: 0

Views: 483

Answers (1)

patrick.elmquist
patrick.elmquist

Reputation: 2140

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

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

Upvotes: 1

Related Questions