Skip to content

Add public instance methods to View class for getting locations and sizes #1760

@hamorphis

Description

@hamorphis
  • View.getLocationInWindow()
  • View.getLocationOnScreen()
  • View.getLocationRelativeTo(view: View)
  • View.getActualSize()

These utility methods will help you identify the view's location in the coordinate systems of the window, the screen or another View. You will also be able to get the actual size of the view after layout has sized it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions