Given a TextView
, is it possible to know at runtime the X and Y coordinates of where it is drawn?
Is it also possible to know the size (width/length) in pixels?
There are getLeft()
, getTop()
, getWidth()
, getHeight()
methods for a view, it works for textView too. for more information , see the following link...
getLeft()
and getTop()
will return you the starting x,y co-ordinates.
http://developer.android.com/reference/android/view/View.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With