MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / getCenter

Method getCenter

src/com/dtmilano/android/viewclient.py:831–841  ·  view source on GitHub ↗

Gets the center coords of the View @author: U{Dean Morin }

(self)

Source from the content-addressed store, hash-verified

829 return self.getCoords()
830
831 def getCenter(self):
832 """
833 Gets the center coords of the View
834
835 @author: U{Dean Morin <https://github.com/deanmorin>}
836 """
837
838 (left, top), (right, bottom) = self.getCoords()
839 x = left + (right - left) / 2
840 y = top + (bottom - top) / 2
841 return x, y
842
843 def __obtainStatusBarDimensionsIfVisible(self):
844 sbw = 0

Callers 5

touchMethod · 0.95
longTouchMethod · 0.95

Calls 1

getCoordsMethod · 0.95

Tested by 2